DETERMINING THE CAUSAL LINKS BETWEEN REPRODUCTIVE TIMING AND METABOLIC RISK: A BIDIRECTIONAL MENDELIAN RANDOMIZATION STUDY

BMIN5030 Final Project

Author

Pauline Gachanja


1 Overview

This project uses Mendelian Randomization (MR) to investigate the bidirectional relationship between reproductive timing, particularly age at menarche (AAM) and age of natural menopause (ANM) with Type 2 Diabetes and Lipids (HDL, LDL, Triglycerides and Total cholesterol). The goal is to determine whether we can use reproductive timing as a diagnostic tool to predict Type 2 Diabetes risk and lipid levels or vice-versa.

2 Introduction

The prevalence of metabolic traits differs largely between men and women. Men tend to have higher incidences throughout their life, leading to the underrpresentation of women in genetic research, based on the assumption that women are protected against metabolic disorders. However, in reality, the mortality associated with metabolic and related cardiometabolic diseases is higher in women than in men. The risk of developing these diseases increases after menopause, a transition that has been linked to the loss of endogenous estrogen. Estrogen deficiency contributes to metabolic dysfunction through mechanisms including endothelial dysfunction, insulin resistance, and dyslipidemia. Both age at menarche (AAM) and age at natural menopause (ANM) reflect key hormonal transitions across a woman’s life course and are therefore important biological markers of long-term metabolic health.

In this study, I am going to use genome-wide association studies (GWAS) summary statistics from large, publicly available studies to investigate the causal direction between each reproductive timing (age at natural menopause and age at menarche) and metabolic risk (Type 2 Diabetes and lipids [HDL, LDL, Triglycerides and Total cholesterol]) using Mendelian Randomization (MR). MR integrates genetics and causal inference, using genetic variants as instrumental variables to determine causation between an exposure and the outcome variable by minimizing confounding causation and reverse causation. A bi-directional MR will be implemented to evaluate whether reproductive timing influences metabolic disease risk and conversely, whether metabolic factors influence the variation of reproductive timing. In addition, a multivariable MR analysis will be conducted by introducing another variable BM1, and determining whether the exposure influences the outcome independent of BMI and vice-versa. The findings from this project aim to evaluate whether reproductive timing can serve as a potential early-life screening marker for identifying women at increased risk of adverse metabolic outcomes and to clarify the central role of BMI in these relationships.

Data sources

To avoid confounding factors and bias, the datasets used for MR should be independent (no-overlapping individuals) of each other and from the same ancestry.

Table 1: Summary of the datasets used in the MR analysis

Category Phenotype Source
Exposure Age at Natural Menopause (ANM)

Day et al. 2016

ReproGen Consortium

Age at Menarche (AAM)

Perry et al. Nature 2014

ReproGen Consortium

Exposure 2 Body mass index (BMI)

Locker et al. 2015

GIANT Consortium

Outcome Type 2 Diabetes

Morris et al. 2012

DIAGRAM Consortium

Lipids (HDL, LDL, Triglycerides, Total Cholesterol)

Willer CJ et al. 2013

GLGC Consortium

Clumping dataset

EUR reference panel

1000 genomes project

3 Methods

3.1 Mendelian Randomization Overview

Basic MR Assumptions

Relevance: The genetic variants (SNPs) used as instruments must be strongly associated with the exposure. This is assessed by GWAS significance threshold (p < 5×10⁻⁸) and F-statistics.

This is essential for the instrument to meaningfully predict the exposure

No confounders: The genetic instruments should not be associated with the confounders of the exposure-outcome relationship.

No Horizontal Pleiotropy: The genetic instruments must influence the outcome only through the exposure and not through any other biological pathway.

Study design used for this project

  • Forward Mendelian Randomization (AAM or ANM -> T2D or Lipid Levels)

  • Reverse Mendelian Randomization (T2D or Lipid Levels -> AAM or ANM )

  • Multivariable Mendelian Randomization for both forward and reverse MR, where we include BMI as a confounding exposure variable.

3.2 Main statistical Methods

F-statistics: This is done to determine whether the genetic instruments are strongly associated with the exposure. If the F-statistics is greater than 10, then the genetic instruments are assumed to be strong, and if they less than 10, then they are considered to be weak and this would introduce bias.

Clumping: This removes SNPs in linkage disequilibrium (LD) with the causal variant, to ensure each SNP provides independent information about the exposure.

Harmonization: This is done to ensure that the exposure and the outcomes SNP effects correspond to the same allele. This step ensures that the direction of effect is consistent across datasets and prevents sign errors that could lead to incorrect causal estimates. Palindromic SNPs with ambiguous strand orientation are handled or removed to maintain accuracy.

MR estimates

  • Inverse Variance Weighted (IVW): This calculates the weighted sum of the wald ratios (beta of the exposure/ beta of the outcome) across all SNPs. It is the primary method and most accurate as it gives unbiased results especially when the assumptions of MR are held. I have based my interpretation based on this method.

  • MR-Egger: It allows for and is sensitive to directional horizontal pleiotropy by estimating an intercept term. It provides a valid causal estimate even when pleiotropy is present, though at the cost of reduced statistical power.

  • Weighted Median: It produces a consistent causal estimate if at least 50% of the total instrument weight comes from valid SNPs. It is robust to violations of assumptions affecting a portion of the instruments.

  • Weighted Mode: This method identifies the most common (modal) causal estimate among SNPs, assuming that the largest subset of instruments contributing to the same causal effect are valid.

  • Simple Mode: The simple mode estimator identifies the mode of the causal effect distribution without applying weights. It is less precise than the weighted mode but useful as an additional sensitivity method.

Sensitivity Analyses

  • Heterogeneity (Cochran’s Q): It checks whether the SNPs have a consistent causal effect. If the p-value <0.05 then heterogeneity is present, indicating possible directional horizontal pleiotropy or presence of invalid instruments.

  • Steiger directionality test: Checks whether the assumed direction in MR is correct. Determines whether the SNPs explains more variance in the exposure or the outcome, if it explains more in the exposure then the direction is correct. If the p-value <0.05 then the direction of MR is correct.

  • MR-Egger intercept pleiotropy test: Checks for directional horizontal pleiotropy. if significant then there is pleiotropy which disrupts the MR assumptions and could lead to causal effect bias. If the p-value <0.05 then there is pleiotropy

  • Leave-one-out analysis: It takes out one SNP at a time and re-calculates the causal effect. This helps to determine potential outliers.

  • Single SNP analysis: It calculates the causal estimate per SNP without combining them, to help identify outliers.

Installing the required packages

##printing the current path
getwd() 
[1] "/Users/gachanja/Desktop/Courses/BMIN_5030/BMIN5030_Final_Project"
##install packages

#install.packages("devtools")
#devtools::install_github("MRCIEU/TwoSampleMR")
#devtools::install_github("MRCIEU/MRInstruments")
#devtools::install_github("rondolab/MR-PRESSO")
#install.packages("ieugwasr")
#install.packages("remotes")
#install.packages("png")
#install.packages("vcfR")
#BiocManager::install("biomaRt")

Loading the required packages

library(tidyverse)
Warning: package 'tibble' was built under R version 4.3.3
Warning: package 'lubridate' was built under R version 4.3.3
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.6
✔ forcats   1.0.1     ✔ stringr   1.6.0
✔ ggplot2   4.0.1     ✔ tibble    3.3.0
✔ lubridate 1.9.4     ✔ tidyr     1.3.1
✔ purrr     1.2.0     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(stringr)
library(ggplot2)
library(MRInstruments)
library(TwoSampleMR)
TwoSampleMR version 0.6.25 

  [>] New authentication requirements: https://mrcieu.github.io/ieugwasr/articles/guide.html#authentication.
  [>] Major upgrades to our servers completed to improve service and stability.
  [>] We need your help to shape our emerging roadmap!
      Please take 2 minutes to give us feedback -
      https://forms.office.com/e/eSr7EFAfCG

Warning:
You are running an old version of the TwoSampleMR package.
This version:   0.6.25
Latest version: 0.6.26
Please consider updating using remotes::install_github('MRCIEU/TwoSampleMR')
library(ieugwasr)
OpenGWAS updates:
  Date: 2024-05-17
  [>] OpenGWAS is growing!
  [>] Please take 2 minutes to give us feedback -
  [>] It will help directly shape our emerging roadmap
  [>] https://forms.office.com/e/eSr7EFAfCG

Attaching package: 'ieugwasr'

The following object is masked from 'package:TwoSampleMR':

    ld_matrix
library(readr)
library(dplyr)
library(remotes)
Warning: package 'remotes' was built under R version 4.3.3

Attaching package: 'remotes'

The following object is masked from 'package:TwoSampleMR':

    add_metadata
library(devtools)
Loading required package: usethis

Attaching package: 'devtools'

The following objects are masked from 'package:remotes':

    dev_package_deps, install_bioc, install_bitbucket, install_cran,
    install_deps, install_dev, install_git, install_github,
    install_gitlab, install_local, install_svn, install_url,
    install_version, update_packages
library(png)
Warning: package 'png' was built under R version 4.3.3
library(MRPRESSO)
library(vcfR)

   *****       ***   vcfR   ***       *****
   This is vcfR 1.15.0 
     browseVignettes('vcfR') # Documentation
     citation('vcfR') # Citation
   *****       *****      *****       *****
library(data.table)
Warning: package 'data.table' was built under R version 4.3.3

Attaching package: 'data.table'

The following objects are masked from 'package:lubridate':

    hour, isoweek, mday, minute, month, quarter, second, wday, week,
    yday, year

The following objects are masked from 'package:dplyr':

    between, first, last

The following object is masked from 'package:purrr':

    transpose

An OpenGWAS token API was loaded to allow access to GWAS summary statistics from OpenGWAS database.

#Sys.getenv("OPENGWAS_JWT") #prevent it from appearing in the html file
options(ieugwasr.cache = TRUE)

4 Age at Menarche

4.1 Age at Menarche and Type 2 Diabetes

4.1.1 Forward MR

Direction: AAM → T2D Exposure: Age at Menarche Outcome: Type 2 Diabetes Research Question: Does age at menarche causally influence T2D risk?

###################################################
# Forward MR: AAM -> T2D
##################################################
#obtain the AAM exposure dataset from openGWAS
exposure_aam <- extract_instruments("ieu-a-1095") #AAM

#clumping
clumped_exp_aam <- clump_data(exposure_aam,clump_r2=0.001,clump_kb=10000, pop="EUR")
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping ieu-a-1095, 68 variants, using EUR population reference
Removing 2 of 68 variants due to LD with other variants or absence from LD reference panel
#clumped_exp_aam <- clump_data(exposure_aam,clump_r2=0.01,pop="EUR")

#F statistic
clumped_exp_aam$F_statistic <- (clumped_exp_aam$beta.exposure^2) /
                               (clumped_exp_aam$se.exposure^2)
summary(clumped_exp_aam$F_statistic)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  29.80   35.04   40.37   84.45   49.03 1373.88 
#obtaining the outcome data
outcome_T2D <- extract_outcome_data(
  snps = clumped_exp_aam$SNP,
  outcomes = "ebi-a-GCST005047" #morris t2d
  #outcomes = "ebi-a-GCST007517" #Mahajan
)
Extracting data for 66 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
#harmonize the data
harmonized_data_aam_T2D <- harmonise_data(clumped_exp_aam,outcome_T2D,action=1)
Harmonising Age at menarche || id:ieu-a-1095 (ieu-a-1095) and Type 2 diabetes || id:ebi-a-GCST005047 (ebi-a-GCST005047)
#head(harmonized_data_aam_T2D)

#calculating the mr estimates
res_aam_T2D <- mr(harmonized_data_aam_T2D)
Analysing 'ieu-a-1095' on 'ebi-a-GCST005047'
res_aam_T2D 
  id.exposure       id.outcome                                outcome
1  ieu-a-1095 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
2  ieu-a-1095 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
3  ieu-a-1095 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
4  ieu-a-1095 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
5  ieu-a-1095 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
                          exposure                    method nsnp           b
1 Age at menarche || id:ieu-a-1095                  MR Egger   66  0.47151124
2 Age at menarche || id:ieu-a-1095           Weighted median   66  0.00000000
3 Age at menarche || id:ieu-a-1095 Inverse variance weighted   66 -0.03900545
4 Age at menarche || id:ieu-a-1095               Simple mode   66  0.21485892
5 Age at menarche || id:ieu-a-1095             Weighted mode   66  0.22362978
          se       pval
1 0.22570337 0.04068236
2 0.06451015 1.00000000
3 0.06318988 0.53705425
4 0.15829148 0.17936043
5 0.12108743 0.06932223
#scatter plots of MR estimates
p1_res_aam_T2D <- mr_scatter_plot(res_aam_T2D, harmonized_data_aam_T2D)
p1_res_aam_T2D[[1]]

#calculating heterogeneity
mr_heterogeneity(harmonized_data_aam_T2D)
  id.exposure       id.outcome                                outcome
1  ieu-a-1095 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
2  ieu-a-1095 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
                          exposure                    method        Q Q_df
1 Age at menarche || id:ieu-a-1095                  MR Egger 170.2504   64
2 Age at menarche || id:ieu-a-1095 Inverse variance weighted 184.9365   65
        Q_pval
1 1.379450e-11
2 1.913436e-13
#calculating pleiotropy
mr_pleiotropy_test(harmonized_data_aam_T2D)
  id.exposure       id.outcome                                outcome
1  ieu-a-1095 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
                          exposure egger_intercept         se       pval
1 Age at menarche || id:ieu-a-1095     -0.02448412 0.01042043 0.02188916
#single snp analysis
res_single_aam_T2D <- mr_singlesnp(harmonized_data_aam_T2D)
head(res_single_aam_T2D)
                          exposure                                outcome
1 Age at menarche || id:ieu-a-1095 Type 2 diabetes || id:ebi-a-GCST005047
2 Age at menarche || id:ieu-a-1095 Type 2 diabetes || id:ebi-a-GCST005047
3 Age at menarche || id:ieu-a-1095 Type 2 diabetes || id:ebi-a-GCST005047
4 Age at menarche || id:ieu-a-1095 Type 2 diabetes || id:ebi-a-GCST005047
5 Age at menarche || id:ieu-a-1095 Type 2 diabetes || id:ebi-a-GCST005047
6 Age at menarche || id:ieu-a-1095 Type 2 diabetes || id:ebi-a-GCST005047
  id.exposure       id.outcome samplesize        SNP          b        se
1  ieu-a-1095 ebi-a-GCST005047      12171 rs10144321 -0.4714905 0.3521333
2  ieu-a-1095 ebi-a-GCST005047      12171 rs10483727 -0.5352054 0.3997189
3  ieu-a-1095 ebi-a-GCST005047      12171  rs1079866 -0.1381990 0.2136694
4  ieu-a-1095 ebi-a-GCST005047      12171 rs10840031  0.0000000 0.3968684
5  ieu-a-1095 ebi-a-GCST005047      12171 rs10938397 -0.7778632 0.3854737
6  ieu-a-1095 ebi-a-GCST005047      12171 rs11022756 -0.4125542 0.3081167
          p
1 0.1805855
2 0.1805855
3 0.5177686
4 1.0000000
5 0.0435974
6 0.1805855
#single snp results forest plot
p2_res_single_aam_T2D <- mr_forest_plot(res_single_aam_T2D)
p2_res_single_aam_T2D[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

#single snp results funnel plot
p4_res_single_aam_T2D <- mr_funnel_plot(res_single_aam_T2D)
p4_res_single_aam_T2D[[1]]

#running loo
res_loo_aam_T2D <- mr_leaveoneout(harmonized_data_aam_T2D)
head(res_loo_aam_T2D)
                          exposure                                outcome
1 Age at menarche || id:ieu-a-1095 Type 2 diabetes || id:ebi-a-GCST005047
2 Age at menarche || id:ieu-a-1095 Type 2 diabetes || id:ebi-a-GCST005047
3 Age at menarche || id:ieu-a-1095 Type 2 diabetes || id:ebi-a-GCST005047
4 Age at menarche || id:ieu-a-1095 Type 2 diabetes || id:ebi-a-GCST005047
5 Age at menarche || id:ieu-a-1095 Type 2 diabetes || id:ebi-a-GCST005047
6 Age at menarche || id:ieu-a-1095 Type 2 diabetes || id:ebi-a-GCST005047
  id.exposure       id.outcome samplesize        SNP           b         se
1  ieu-a-1095 ebi-a-GCST005047      12171 rs10144321 -0.03405453 0.06378037
2  ieu-a-1095 ebi-a-GCST005047      12171 rs10483727 -0.03460836 0.06369375
3  ieu-a-1095 ebi-a-GCST005047      12171  rs1079866 -0.03585955 0.06464468
4  ieu-a-1095 ebi-a-GCST005047      12171 rs10840031 -0.03935612 0.06396557
5  ieu-a-1095 ebi-a-GCST005047      12171 rs10938397 -0.03196049 0.06333965
6  ieu-a-1095 ebi-a-GCST005047      12171 rs11022756 -0.03340051 0.06389831
          p
1 0.5933870
2 0.5868849
3 0.5790877
4 0.5383762
5 0.6138476
6 0.6011737
#ploting loo reukts
res_loo_aam_T2D <- mr_leaveoneout_plot(res_loo_aam_T2D)
res_loo_aam_T2D[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

#steiger directionality test
out_aam_T2D <- directionality_test(harmonized_data_aam_T2D)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_aam_T2D
  id.exposure       id.outcome                         exposure
1  ieu-a-1095 ebi-a-GCST005047 Age at menarche || id:ieu-a-1095
                                 outcome snp_r2.exposure snp_r2.outcome
1 Type 2 diabetes || id:ebi-a-GCST005047      0.02548295     0.01417032
  correct_causal_direction steiger_pval
1                     TRUE 9.771126e-06

4.1.2 Results for Forward MR (AAM → T2D)

Method β (Effect) SE p-value
IVW -0.039 0.0631 0.5371 Not significant
Weighted median 0 0.0664 1 Not significant
MR-Egger 0.4715 0.2257 0.0407 Significant
Simple Mode 0.2149 0.1659 0.1720 Not significant
Weighted mode 0.2236 0.1312 0.0803 Not significant

MR scatter plot: The SNP points are widely scattered with most of the estimates lines lying close to 0 except for the MR-Egger line, which shows a noticeable positive slope. Since most of the MR estimates show no causal effect, the MR-Egger is likely influenced by pleiotropy.

Sensitivity analyses

  • Heterogeneity -> Strong heterogeneity was observed, indicating inconsistent SNP effects and suggesting possible pleiotropic effects.

  • MR-Egger pleiotropy test -> the egger intercept was significant too, indicating directional pleiotropy is present, violating MR assumption of no pleiotropy.

  • Steiger directionality test -> p = 9.77 × 10⁻⁶, confirming the correct causal direction is AAM to T2D, and that reverse causation is unlikely.

  • Single SNP analysis( and the forest plot) -> Almost all the SNPs were non-significant, showing no strong outliers dominating the results.

    • Funnel plot: The SNPs show asymmetrical distribution. The MR Egger and IVW do not overlap indicating directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the estimates are close to 0 with the confidence intervals crossing 0, indicating no SNP shifts/drives the effect.

Conclusion: age at menarche does not causally influence T2D risk.

4.2 Forward Multivariable MR (MVMR)

Direction: AAM + BMI → T2D
Exposures: Age at Menarche, Body Mass Index
Outcome: Type 2 Diabetes
Research Question: Does age at menarche affect T2D independent of BMI? and how does BMI affect T2D independent of AAM.

###################################################
# Multivariable MR: AAM + BMI -> T2D
##################################################
# Instruments for AAM + BMI
exp_mv <- mv_extract_exposures(
  id_exposure = c("ieu-a-1095", "ieu-a-2"),
  clump_r2 = 0.001,
  clump_kb = 10000,
  pop = "EUR"
)
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping 1, 145 variants, using EUR population reference
Removing 24 of 145 variants due to LD with other variants or absence from LD reference panel
Extracting data for 121 SNP(s) from 2 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 4
Querying variant chunk 2 of 4
Querying variant chunk 3 of 4
Querying variant chunk 4 of 4
Harmonising Age at menarche || id:ieu-a-1095 (ieu-a-1095) and Body mass index || id:ieu-a-2 (ieu-a-2)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs1518080, rs1558902, rs1874984, rs4242496, rs4801589, rs9373571
# Outcome: T2D
out_T2D <- extract_outcome_data(
  snps     = exp_mv$SNP,
  outcomes = "ebi-a-GCST005047"
)
Extracting data for 115 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 1 SNPs in outcome ebi-a-GCST005047
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
# Harmonise
mvdat <- mv_harmonise_data(exp_mv, out_T2D)
Harmonising Age at menarche || id:ieu-a-1095 (ieu-a-1095) and Type 2 diabetes || id:ebi-a-GCST005047 (ebi-a-GCST005047)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs1079866, rs14810, rs17001654, rs2617056, rs2836950, rs3914188, rs9304665, rs9555810, rs9579083, rs9914578
# Multivariable MR
res_mvmr <- mv_multiple(mvdat)
res_mvmr
$result
  id.exposure                         exposure       id.outcome
1  ieu-a-1095 Age at menarche || id:ieu-a-1095 ebi-a-GCST005047
2     ieu-a-2    Body mass index || id:ieu-a-2 ebi-a-GCST005047
                                 outcome nsnp         b        se       pval
1 Type 2 diabetes || id:ebi-a-GCST005047   49 0.1014863 0.1084571 0.34941378
2 Type 2 diabetes || id:ebi-a-GCST005047   59 0.5860446 0.1858535 0.00161457
# Main MVMR plot
ggplot(res_mvmr$result, aes(x = exposure, y = b)) +
  geom_point(size = 3) +
  geom_errorbar(
    aes(ymin = b - 1.96 * se, ymax = b + 1.96 * se),
    width = 0.1
  ) +
  theme_bw() +
  labs(
    title = "Multivariable MR: Direct effects on Type 2 Diabetes",
    x = "Exposure",
    y = "Effect on T2D"
  )

4.2.1 Results for Forward Multivariable MR (AAM + BMI→ T2D)

Exposure β SE p-value
AAM 0.1014 0.1084 0.3494
BMI 0.5860 0.1858 0.0016

Looking at the MVMR results, age at menarche had insignificant p-values (0.34941378) while BMI had significant p-values (0.00161457). After adjusting for BMI, age at menarche has no direct causal effects on T2D, confirming our forward MR conclusion. However, BMI has strong direct causal effect on type 2 diabetes.

4.3 Reverse MR

Direction: T2D → AAM
Exposure: Type 2 Diabetes
Outcome: Age at Menarche
Research Question: Does T2D causally influence age at menarche?

###################################################
#Reverse MR: T2D -> AAM
##################################################

#Instruments for T2D (exposure)
exp_T2D <- extract_instruments("ebi-a-GCST005047") #t2d

#ld clumping
exp_T2D_clumped <- clump_data(exp_T2D, clump_r2 = 0.001, clump_kb =10000, pop = "EUR")
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping ebi-a-GCST005047, 34 variants, using EUR population reference
exp_T2D_clumped$F_statistic <- (exp_T2D_clumped$beta.exposure^2) /
                               (exp_T2D_clumped$se.exposure^2)
summary(exp_T2D_clumped$F_statistic)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  23.00   41.10   49.40   81.31   71.09  546.36 
#Outcome = aam
out_aam <- extract_outcome_data(
  snps     = exp_T2D_clumped$SNP,
  outcomes = "ieu-a-1095"
)
Extracting data for 34 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
#Harmonise
harmonise_data_T2D_aam <- harmonise_data(exp_T2D_clumped, out_aam, action = 1)
Harmonising Type 2 diabetes || id:ebi-a-GCST005047 (ebi-a-GCST005047) and Age at menarche || id:ieu-a-1095 (ieu-a-1095)
#Reverse MR
res_T2D_aam <- mr(harmonise_data_T2D_aam)
Analysing 'ebi-a-GCST005047' on 'ieu-a-1095'
res_T2D_aam
       id.exposure id.outcome                          outcome
1 ebi-a-GCST005047 ieu-a-1095 Age at menarche || id:ieu-a-1095
2 ebi-a-GCST005047 ieu-a-1095 Age at menarche || id:ieu-a-1095
3 ebi-a-GCST005047 ieu-a-1095 Age at menarche || id:ieu-a-1095
4 ebi-a-GCST005047 ieu-a-1095 Age at menarche || id:ieu-a-1095
5 ebi-a-GCST005047 ieu-a-1095 Age at menarche || id:ieu-a-1095
                                exposure                    method nsnp
1 Type 2 diabetes || id:ebi-a-GCST005047                  MR Egger   34
2 Type 2 diabetes || id:ebi-a-GCST005047           Weighted median   34
3 Type 2 diabetes || id:ebi-a-GCST005047 Inverse variance weighted   34
4 Type 2 diabetes || id:ebi-a-GCST005047               Simple mode   34
5 Type 2 diabetes || id:ebi-a-GCST005047             Weighted mode   34
             b         se      pval
1  0.083987705 0.04672760 0.0817170
2  0.009466472 0.01698853 0.5773722
3 -0.011680382 0.01871171 0.5324775
4 -0.021300886 0.03782269 0.5771209
5  0.025028326 0.02005179 0.2207474
# Scatter plot for MR estimatess
p1_res_T2D_aam <- mr_scatter_plot(res_T2D_aam, harmonise_data_T2D_aam)
p1_res_T2D_aam[[1]]

#calculating heterogeneity
mr_heterogeneity(harmonise_data_T2D_aam)
       id.exposure id.outcome                          outcome
1 ebi-a-GCST005047 ieu-a-1095 Age at menarche || id:ieu-a-1095
2 ebi-a-GCST005047 ieu-a-1095 Age at menarche || id:ieu-a-1095
                                exposure                    method         Q
1 Type 2 diabetes || id:ebi-a-GCST005047                  MR Egger  92.64797
2 Type 2 diabetes || id:ebi-a-GCST005047 Inverse variance weighted 106.81604
  Q_df       Q_pval
1   32 8.245362e-08
2   33 1.029073e-09
#calculating pleiotropy
mr_pleiotropy_test(harmonise_data_T2D_aam)
       id.exposure id.outcome                          outcome
1 ebi-a-GCST005047 ieu-a-1095 Age at menarche || id:ieu-a-1095
                                exposure egger_intercept          se       pval
1 Type 2 diabetes || id:ebi-a-GCST005047     -0.01137421 0.005141724 0.03421572
#Single-SNP MR
res_single_T2D_aam <- mr_singlesnp(harmonise_data_T2D_aam)
head(res_single_T2D_aam)
                                exposure                          outcome
1 Type 2 diabetes || id:ebi-a-GCST005047 Age at menarche || id:ieu-a-1095
2 Type 2 diabetes || id:ebi-a-GCST005047 Age at menarche || id:ieu-a-1095
3 Type 2 diabetes || id:ebi-a-GCST005047 Age at menarche || id:ieu-a-1095
4 Type 2 diabetes || id:ebi-a-GCST005047 Age at menarche || id:ieu-a-1095
5 Type 2 diabetes || id:ebi-a-GCST005047 Age at menarche || id:ieu-a-1095
6 Type 2 diabetes || id:ebi-a-GCST005047 Age at menarche || id:ieu-a-1095
       id.exposure id.outcome samplesize        SNP           b         se
1 ebi-a-GCST005047 ieu-a-1095     182416 rs10099941 -0.05764234 0.08350232
2 ebi-a-GCST005047 ieu-a-1095     182416 rs10258074  0.03713258 0.06710089
3 ebi-a-GCST005047 ieu-a-1095     182416 rs10830961 -0.11603930 0.07260660
4 ebi-a-GCST005047 ieu-a-1095     182416 rs10842993  0.06150083 0.08323894
5 ebi-a-GCST005047 ieu-a-1095     182416 rs11257655 -0.03777140 0.07617506
6 ebi-a-GCST005047 ieu-a-1095     182416 rs11708067 -0.04931267 0.07484802
          p
1 0.4900004
2 0.5800003
3 0.1100002
4 0.4600000
5 0.6200002
6 0.5100003
#Forest plot for Single-SNP MR
p2_res_single_T2D_aam <- mr_forest_plot(res_single_T2D_aam)
p2_res_single_T2D_aam[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

#Funnel plot for Single-SNP MR
p4_res_single_T2D_aam <- mr_funnel_plot(res_single_T2D_aam)
p4_res_single_T2D_aam[[1]]

#Leave-one-out
res_loo_T2D_aam <- mr_leaveoneout(harmonise_data_T2D_aam)
head(res_loo_T2D_aam)
                                exposure                          outcome
1 Type 2 diabetes || id:ebi-a-GCST005047 Age at menarche || id:ieu-a-1095
2 Type 2 diabetes || id:ebi-a-GCST005047 Age at menarche || id:ieu-a-1095
3 Type 2 diabetes || id:ebi-a-GCST005047 Age at menarche || id:ieu-a-1095
4 Type 2 diabetes || id:ebi-a-GCST005047 Age at menarche || id:ieu-a-1095
5 Type 2 diabetes || id:ebi-a-GCST005047 Age at menarche || id:ieu-a-1095
6 Type 2 diabetes || id:ebi-a-GCST005047 Age at menarche || id:ieu-a-1095
       id.exposure id.outcome samplesize        SNP            b         se
1 ebi-a-GCST005047 ieu-a-1095     182416 rs10099941 -0.010956119 0.01912335
2 ebi-a-GCST005047 ieu-a-1095     182416 rs10258074 -0.012881937 0.01918540
3 ebi-a-GCST005047 ieu-a-1095     182416 rs10830961 -0.009494204 0.01900933
4 ebi-a-GCST005047 ieu-a-1095     182416 rs10842993 -0.012840987 0.01908139
5 ebi-a-GCST005047 ieu-a-1095     182416 rs11257655 -0.011184770 0.01917072
6 ebi-a-GCST005047 ieu-a-1095     182416 rs11708067 -0.010939461 0.01916481
          p
1 0.5666999
2 0.5019371
3 0.6174626
4 0.5009736
5 0.5596040
6 0.5681286
#Leave-one-out plot
p_loo_T2D_aam <- mr_leaveoneout_plot(res_loo_T2D_aam)
p_loo_T2D_aam[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

#Steiger directionality test
out_T2D_aam <- directionality_test(harmonise_data_T2D_aam)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_T2D_aam
       id.exposure id.outcome                               exposure
1 ebi-a-GCST005047 ieu-a-1095 Type 2 diabetes || id:ebi-a-GCST005047
                           outcome snp_r2.exposure snp_r2.outcome
1 Age at menarche || id:ieu-a-1095       0.1541034    0.000592452
  correct_causal_direction steiger_pval
1                     TRUE            0

4.3.1 Results for Reverse MR (T2D → AAM)

Method β SE p-value
IVW −0.0117 0.0187 0.5324 Not significant
Weighted median 0.0095 0.0170 0.5762 Not significant
MR-Egger 0.0840 0.0467 0.8172 Not significant
Simple mode -0.0213 0.0373 0.5268 Not significant
Weighted mode 0.0250 0.0202 0.2234 Not significant

MR scatter plot: The SNP points are mostly distributed close to 0 and the MR estimates points show a similar pattern except for the MR-Egger line, which shows a noticeable positive slope. Since most of the MR estimates show no causal effect, the MR-Egger is likely influenced by pleiotropy.

Sensitivity analyses

  • Heterogeneity -> Strong heterogeneity was observed( MR Egger and IVW Qp-values 8.245362e-08 and 1.029073e-09 respectively), indicating inconsistent SNP effects and suggesting possible pleiotropic effects.

  • MR-Egger pleiotropy test -> The egger intercept was significant, indicating directional pleiotropy is present, violating MR assumption of no pleiotropy, meaning some T2D affects AAM through pathways other than T2D.

  • Steiger directionality test -> p = 0 which is significant, causal direction is correct T2D to AAM.

  • Single SNP analysis (and the forest plots)-> A few SNPs are significant but the majority are non significant (p-values >0.05 and CI crossing 0). The effect sizes go in both positive and negative directions and with no consistent patterns. Even though MR-Egger is slightly positive and IVW estimate, they both overlap 0, thus not significant, indicating no causal effect of type 2 diabetes on age at menarche.

    • Funnel plot: The SNPs show asymmetrical distribution, with most SNPs below 0 indicating directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the estimates are less than 0 and near -0.01 with the confidence intervals crossing 0, indicating no SNP shifts/drives the effect.

Conclusion: This MR analysis provides no evidence that the T2D has a direct causal effect on age at menarche.

4.4 Reverse Multivariable MR (MVMR)

Direction: T2D + BMI → AAM
Exposures: Type 2 Diabetes, Body Mass Index
Outcome: Age at Menarche
Research Question: Does T2D influence age at menarche independent of BMI? and does BMI causally influence T2D independent of AAM.

###################################################
# Reverse MVMR: T2D + BMI -> AAM
##################################################
#exposure t2d and bmi
exp_mv_rev <- mv_extract_exposures(
  id_exposure = c(
    "ebi-a-GCST005047",   # t2d
    "ieu-a-2"            # BMI
  ),
  clump_r2 = 0.001,
  clump_kb = 10000,
  pop = "EUR"
)
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping 1, 112 variants, using EUR population reference
Removing 11 of 112 variants due to LD with other variants or absence from LD reference panel
Extracting data for 101 SNP(s) from 2 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 4
Querying variant chunk 2 of 4
Querying variant chunk 3 of 4
Querying variant chunk 4 of 4
Finding proxies for 1 SNPs in outcome ebi-a-GCST005047
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Type 2 diabetes || id:ebi-a-GCST005047 (ebi-a-GCST005047) and Body mass index || id:ieu-a-2 (ieu-a-2)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs10258074, rs14810, rs1558902, rs17001654, rs4237150, rs6494307, rs9304665, rs9579083, rs9914578
#Outcome = aam
out_aam_rev <- extract_outcome_data(
  snps     = exp_mv_rev$SNP,
  outcomes = "ieu-a-1095"
)
Extracting data for 91 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
#Harmonise 
mvdat_rev_T2D_aam <- mv_harmonise_data(exp_mv_rev, out_aam_rev)
Harmonising Type 2 diabetes || id:ebi-a-GCST005047 (ebi-a-GCST005047) and Age at menarche || id:ieu-a-1095 (ieu-a-1095)
#Reverse multivariable MR
res_mvmr_rev_T2D_aam <- mv_multiple(mvdat_rev_T2D_aam)
res_mvmr_rev_T2D_aam$result
       id.exposure                               exposure id.outcome
1 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047 ieu-a-1095
2          ieu-a-2          Body mass index || id:ieu-a-2 ieu-a-1095
                           outcome nsnp           b         se         pval
1 Age at menarche || id:ieu-a-1095   26 -0.02802139 0.01820380 1.237274e-01
2 Age at menarche || id:ieu-a-1095   67 -0.53030869 0.05138305 5.681115e-25
#Plot reverse MVMR
ggplot(res_mvmr_rev_T2D_aam$result, aes(x = exposure, y = b)) +
  geom_point(size = 3) +
  geom_errorbar(
    aes(ymin = b - 1.96 * se, ymax = b + 1.96 * se),
    width = 0.1
  ) +
  theme_bw() +
  labs(
    title = "Reverse MVMR: Effects on Age at menarche",  
    x = "Exposure",
    y = "Effect on AAM"
  )

4.4.1 Results for Reverse Multivariable MR (T2D + BMI → AAM)

Exposure β SE p-value
T2D -0.028 0.018 1.237274e-01
BMI -0.530 0.051 5.681115e-25

The p-values for T2D was insignificant, indicating that T2D has no direct causal effect on age at menarche even after adjusting for BMI. However, BMI was significant with a negative beta, suggesting that higher BMI leads to earlier age at menarche independent of T2D.

This suggests that BMI rather than T2D is a primary causal determinant for early puberty.

4.5 Age at Menarche and Lipid levels

Lipids used LDL, HDL, Triglycerides (TG) and Total Cholesterol (TC)

4.6 Forward MR

Direction: AAM → LDL, AAM → HDL, AAM → TG, AAM →TC
Exposure: Age at Menarche
Outcome: LDL, HDL, TG, TC
Research Question: Does age at menarche causally influence each lipid levels?

###################################################
# Forward MR: AAM -> Lipids
##################################################


###we alredy have clumped_exp_AAM from the previous MR

#TG -> ebi-a-GCST002216
#TC -> ebi-a-GCST002221
#LDL -> ebi-a-GCST002222
#HDL -> ebi-a-GCST002223
lipids <- c(
  "ebi-a-GCST002222",  # LDL
  "ebi-a-GCST002223",  # HDL
  "ebi-a-GCST002216",  # Triglycerides
  "ebi-a-GCST002221"   # Total Cholesterol
)

###Loop AAM -> Lipids MR
mr_results_aam_to_lipids <- list()
harmonised_results <- list()

for(lipid in lipids){

  outcome_lipids <- extract_outcome_data(
    snps = clumped_exp_aam$SNP,
    outcomes = lipid
  )

  harmonise_data_aam_to_lipids <- harmonise_data(
    exposure_dat = clumped_exp_aam,
    outcome_dat = outcome_lipids
  )

  harmonised_results[[lipid]] <- harmonise_data_aam_to_lipids
   
  if(nrow(harmonise_data_aam_to_lipids) > 3){
    res_aam_to_lipids <- mr(harmonise_data_aam_to_lipids)
  } else {
    res_aam_to_lipids <- NA
  }

  mr_results_aam_to_lipids[[lipid]] <- res_aam_to_lipids
}
Extracting data for 66 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 1 SNPs in outcome ebi-a-GCST002222
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Age at menarche || id:ieu-a-1095 (ieu-a-1095) and LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs1079866, rs11756454, rs1518080, rs17351680, rs1874984, rs2617056, rs2836950, rs3914188, rs4242496, rs4801589, rs9373571, rs9555810, rs9939609
Analysing 'ieu-a-1095' on 'ebi-a-GCST002222'
Extracting data for 66 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Harmonising Age at menarche || id:ieu-a-1095 (ieu-a-1095) and HDL cholesterol || id:ebi-a-GCST002223 (ebi-a-GCST002223)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs1079866, rs11756454, rs1518080, rs17351680, rs1874984, rs2617056, rs2836950, rs3914188, rs4242496, rs4801589, rs9373571, rs9555810, rs9939609
Analysing 'ieu-a-1095' on 'ebi-a-GCST002223'
Extracting data for 66 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Harmonising Age at menarche || id:ieu-a-1095 (ieu-a-1095) and Triglycerides || id:ebi-a-GCST002216 (ebi-a-GCST002216)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs1079866, rs11756454, rs1518080, rs17351680, rs1874984, rs2617056, rs2836950, rs3914188, rs4242496, rs4801589, rs9373571, rs9555810, rs9939609
Analysing 'ieu-a-1095' on 'ebi-a-GCST002216'
Extracting data for 66 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 1 SNPs in outcome ebi-a-GCST002221
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Age at menarche || id:ieu-a-1095 (ieu-a-1095) and Cholesterol, total || id:ebi-a-GCST002221 (ebi-a-GCST002221)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs1079866, rs11756454, rs1518080, rs17351680, rs1874984, rs2617056, rs2836950, rs3914188, rs4242496, rs4801589, rs9373571, rs9555810, rs9939609
Analysing 'ieu-a-1095' on 'ebi-a-GCST002221'
mr_results_aam_to_lipids
$`ebi-a-GCST002222`
  id.exposure       id.outcome                                outcome
1  ieu-a-1095 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
2  ieu-a-1095 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
3  ieu-a-1095 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
4  ieu-a-1095 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
5  ieu-a-1095 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
                          exposure                    method nsnp            b
1 Age at menarche || id:ieu-a-1095                  MR Egger   53 -0.027240702
2 Age at menarche || id:ieu-a-1095           Weighted median   53  0.008413812
3 Age at menarche || id:ieu-a-1095 Inverse variance weighted   53  0.006126733
4 Age at menarche || id:ieu-a-1095               Simple mode   53 -0.009294822
5 Age at menarche || id:ieu-a-1095             Weighted mode   53 -0.002438460
          se      pval
1 0.08054616 0.7366009
2 0.02471717 0.7335526
3 0.02080083 0.7683432
4 0.05717451 0.8714876
5 0.04188517 0.9537983

$`ebi-a-GCST002223`
  id.exposure       id.outcome                                outcome
1  ieu-a-1095 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
2  ieu-a-1095 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
3  ieu-a-1095 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
4  ieu-a-1095 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
5  ieu-a-1095 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
                          exposure                    method nsnp          b
1 Age at menarche || id:ieu-a-1095                  MR Egger   53 0.11165469
2 Age at menarche || id:ieu-a-1095           Weighted median   53 0.07710385
3 Age at menarche || id:ieu-a-1095 Inverse variance weighted   53 0.07230400
4 Age at menarche || id:ieu-a-1095               Simple mode   53 0.03836100
5 Age at menarche || id:ieu-a-1095             Weighted mode   53 0.05195367
          se         pval
1 0.07601272 0.1480029741
2 0.02474681 0.0018350357
3 0.01973294 0.0002481833
4 0.05916391 0.5195889779
5 0.05705178 0.3666868012

$`ebi-a-GCST002216`
  id.exposure       id.outcome                              outcome
1  ieu-a-1095 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
2  ieu-a-1095 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
3  ieu-a-1095 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
4  ieu-a-1095 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
5  ieu-a-1095 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
                          exposure                    method nsnp            b
1 Age at menarche || id:ieu-a-1095                  MR Egger   53  0.007630288
2 Age at menarche || id:ieu-a-1095           Weighted median   53 -0.042285086
3 Age at menarche || id:ieu-a-1095 Inverse variance weighted   53 -0.037800973
4 Age at menarche || id:ieu-a-1095               Simple mode   53 -0.034029896
5 Age at menarche || id:ieu-a-1095             Weighted mode   53 -0.030079878
          se       pval
1 0.07662058 0.92106395
2 0.02408466 0.07914211
3 0.01988395 0.05729160
4 0.04934471 0.49348927
5 0.03504979 0.39471822

$`ebi-a-GCST002221`
  id.exposure       id.outcome                                   outcome
1  ieu-a-1095 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
2  ieu-a-1095 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
3  ieu-a-1095 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
4  ieu-a-1095 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
5  ieu-a-1095 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
                          exposure                    method nsnp             b
1 Age at menarche || id:ieu-a-1095                  MR Egger   53  2.914114e-02
2 Age at menarche || id:ieu-a-1095           Weighted median   53  1.878874e-03
3 Age at menarche || id:ieu-a-1095 Inverse variance weighted   53  1.311659e-02
4 Age at menarche || id:ieu-a-1095               Simple mode   53 -1.998854e-02
5 Age at menarche || id:ieu-a-1095             Weighted mode   53  2.152908e-05
          se      pval
1 0.08542199 0.7343972
2 0.02522065 0.9406146
3 0.02211328 0.5530778
4 0.05310002 0.7081275
5 0.04414909 0.9996128
#############################
###Plot results for AAM_to_LDL
data_aam_to_ldl <- harmonised_results[["ebi-a-GCST002222"]]
res_aam_to_ldl <- mr_results_aam_to_lipids[["ebi-a-GCST002222"]]

#scatter plot

p1_res_aam_to_ldl <- mr_scatter_plot(res_aam_to_ldl, data_aam_to_ldl)
p1_res_aam_to_ldl[[1]]

# Heterogeneity & pleiotropy
mr_heterogeneity(data_aam_to_ldl)
  id.exposure       id.outcome                                outcome
1  ieu-a-1095 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
2  ieu-a-1095 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
                          exposure                    method        Q Q_df
1 Age at menarche || id:ieu-a-1095                  MR Egger 81.95895   51
2 Age at menarche || id:ieu-a-1095 Inverse variance weighted 82.25479   52
       Q_pval
1 0.003858749
2 0.004739495
mr_pleiotropy_test(data_aam_to_ldl)
  id.exposure       id.outcome                                outcome
1  ieu-a-1095 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
                          exposure egger_intercept          se      pval
1 Age at menarche || id:ieu-a-1095     0.001585285 0.003694829 0.6696903
# Single-SNP MR
res_single_aam_to_ldl <- mr_singlesnp(data_aam_to_ldl)
head(res_single_aam_to_ldl)
                          exposure                                outcome
1 Age at menarche || id:ieu-a-1095 LDL cholesterol || id:ebi-a-GCST002222
2 Age at menarche || id:ieu-a-1095 LDL cholesterol || id:ebi-a-GCST002222
3 Age at menarche || id:ieu-a-1095 LDL cholesterol || id:ebi-a-GCST002222
4 Age at menarche || id:ieu-a-1095 LDL cholesterol || id:ebi-a-GCST002222
5 Age at menarche || id:ieu-a-1095 LDL cholesterol || id:ebi-a-GCST002222
6 Age at menarche || id:ieu-a-1095 LDL cholesterol || id:ebi-a-GCST002222
  id.exposure       id.outcome samplesize        SNP           b        se
1  ieu-a-1095 ebi-a-GCST002222      94595 rs10144321  0.23095238 0.1404762
2  ieu-a-1095 ebi-a-GCST002222      94595 rs10483727  0.02162162 0.1027027
3  ieu-a-1095 ebi-a-GCST002222      94595 rs10840031  0.01842105 0.1052632
4  ieu-a-1095 ebi-a-GCST002222      94595 rs10938397 -0.20789474 0.1000000
5  ieu-a-1095 ebi-a-GCST002222      94595 rs11022756  0.12083333 0.1208333
6  ieu-a-1095 ebi-a-GCST002222      94595 rs11715566  0.06346154 0.1000000
           p
1 0.10016220
2 0.83325691
3 0.86107963
4 0.03762219
5 0.31731051
6 0.52567929
p2_res_single_aam_to_ldl <- mr_forest_plot(res_single_aam_to_ldl)
p2_res_single_aam_to_ldl[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_res_single_aam_to_ldl <- mr_funnel_plot(res_single_aam_to_ldl)
p4_res_single_aam_to_ldl[[1]]

# Leave-one-out
res_loo_aam_to_ldl <- mr_leaveoneout(data_aam_to_ldl)
head(res_loo_aam_to_ldl)
                          exposure                                outcome
1 Age at menarche || id:ieu-a-1095 LDL cholesterol || id:ebi-a-GCST002222
2 Age at menarche || id:ieu-a-1095 LDL cholesterol || id:ebi-a-GCST002222
3 Age at menarche || id:ieu-a-1095 LDL cholesterol || id:ebi-a-GCST002222
4 Age at menarche || id:ieu-a-1095 LDL cholesterol || id:ebi-a-GCST002222
5 Age at menarche || id:ieu-a-1095 LDL cholesterol || id:ebi-a-GCST002222
6 Age at menarche || id:ieu-a-1095 LDL cholesterol || id:ebi-a-GCST002222
  id.exposure       id.outcome samplesize        SNP           b         se
1  ieu-a-1095 ebi-a-GCST002222      94595 rs10144321 0.002966598 0.02081423
2  ieu-a-1095 ebi-a-GCST002222      94595 rs10483727 0.005714219 0.02127849
3  ieu-a-1095 ebi-a-GCST002222      94595 rs10840031 0.005815554 0.02126611
4  ieu-a-1095 ebi-a-GCST002222      94595 rs10938397 0.012145471 0.02067841
5  ieu-a-1095 ebi-a-GCST002222      94595 rs11022756 0.003936797 0.02108462
6  ieu-a-1095 ebi-a-GCST002222      94595 rs11715566 0.004514357 0.02125326
          p
1 0.8866635
2 0.7882804
3 0.7844952
4 0.5569684
5 0.8518847
6 0.8317889
p_loo_aam_to_ldl <- mr_leaveoneout_plot(res_loo_aam_to_ldl)
p_loo_aam_to_ldl[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

# Steiger directionality
out_aam_to_ldl <- directionality_test(data_aam_to_ldl)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_aam_to_ldl
  id.exposure       id.outcome                         exposure
1  ieu-a-1095 ebi-a-GCST002222 Age at menarche || id:ieu-a-1095
                                 outcome snp_r2.exposure snp_r2.outcome
1 LDL cholesterol || id:ebi-a-GCST002222      0.02548295    0.001084392
  correct_causal_direction  steiger_pval
1                     TRUE 3.503484e-224
#############################
###Plot results for AAM_to_HDL

data_aam_to_hdl <- harmonised_results[["ebi-a-GCST002223"]]
res_aam_to_hdl <- mr_results_aam_to_lipids[["ebi-a-GCST002223"]]

#scatter plot

p1_res_aam_to_hdl <- mr_scatter_plot(res_aam_to_hdl, data_aam_to_hdl)
p1_res_aam_to_hdl[[1]]

# Heterogeneity & pleiotropy
mr_heterogeneity(data_aam_to_hdl)
  id.exposure       id.outcome                                outcome
1  ieu-a-1095 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
2  ieu-a-1095 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
                          exposure                    method        Q Q_df
1 Age at menarche || id:ieu-a-1095                  MR Egger 87.65555   51
2 Age at menarche || id:ieu-a-1095 Inverse variance weighted 88.14995   52
       Q_pval
1 0.001075513
2 0.001294944
mr_pleiotropy_test(data_aam_to_hdl)
  id.exposure       id.outcome                                outcome
1  ieu-a-1095 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
                          exposure egger_intercept          se      pval
1 Age at menarche || id:ieu-a-1095    -0.001874735 0.003495469 0.5940602
# Single-SNP MR
res_single_aam_to_hdl <- mr_singlesnp(data_aam_to_hdl)
head(res_single_aam_to_hdl)
                          exposure                                outcome
1 Age at menarche || id:ieu-a-1095 HDL cholesterol || id:ebi-a-GCST002223
2 Age at menarche || id:ieu-a-1095 HDL cholesterol || id:ebi-a-GCST002223
3 Age at menarche || id:ieu-a-1095 HDL cholesterol || id:ebi-a-GCST002223
4 Age at menarche || id:ieu-a-1095 HDL cholesterol || id:ebi-a-GCST002223
5 Age at menarche || id:ieu-a-1095 HDL cholesterol || id:ebi-a-GCST002223
6 Age at menarche || id:ieu-a-1095 HDL cholesterol || id:ebi-a-GCST002223
  id.exposure       id.outcome samplesize        SNP           b         se
1  ieu-a-1095 ebi-a-GCST002223      94595 rs10144321 -0.07857143 0.13095238
2  ieu-a-1095 ebi-a-GCST002223      94595 rs10483727  0.06216216 0.09459459
3  ieu-a-1095 ebi-a-GCST002223      94595 rs10840031  0.08157895 0.09736842
4  ieu-a-1095 ebi-a-GCST002223      94595 rs10938397  0.21842105 0.09473684
5  ieu-a-1095 ebi-a-GCST002223      94595 rs11022756  0.26041667 0.11041667
6  ieu-a-1095 ebi-a-GCST002223      94595 rs11715566  0.12500000 0.09230769
           p
1 0.54850624
2 0.51108906
3 0.40212178
4 0.02113548
5 0.01834943
6 0.17568321
p2_res_single_aam_to_hdl <- mr_forest_plot(res_single_aam_to_hdl)
p2_res_single_aam_to_hdl[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_res_single_aam_to_hdl <- mr_funnel_plot(res_single_aam_to_hdl)
p4_res_single_aam_to_hdl[[1]]

# Leave-one-out
res_loo_aam_to_hdl <- mr_leaveoneout(data_aam_to_hdl)
head(res_loo_aam_to_hdl)
                          exposure                                outcome
1 Age at menarche || id:ieu-a-1095 HDL cholesterol || id:ebi-a-GCST002223
2 Age at menarche || id:ieu-a-1095 HDL cholesterol || id:ebi-a-GCST002223
3 Age at menarche || id:ieu-a-1095 HDL cholesterol || id:ebi-a-GCST002223
4 Age at menarche || id:ieu-a-1095 HDL cholesterol || id:ebi-a-GCST002223
5 Age at menarche || id:ieu-a-1095 HDL cholesterol || id:ebi-a-GCST002223
6 Age at menarche || id:ieu-a-1095 HDL cholesterol || id:ebi-a-GCST002223
  id.exposure       id.outcome samplesize        SNP          b         se
1  ieu-a-1095 ebi-a-GCST002223      94595 rs10144321 0.07435240 0.01990659
2  ieu-a-1095 ebi-a-GCST002223      94595 rs10483727 0.07257121 0.02018489
3  ieu-a-1095 ebi-a-GCST002223      94595 rs10840031 0.07207371 0.02017026
4  ieu-a-1095 ebi-a-GCST002223      94595 rs10938397 0.06846616 0.01990396
5  ieu-a-1095 ebi-a-GCST002223      94595 rs11022756 0.06869179 0.01977545
6  ieu-a-1095 ebi-a-GCST002223      94595 rs11715566 0.07084406 0.02016118
             p
1 0.0001876665
2 0.0003239885
3 0.0003525554
4 0.0005820888
5 0.0005135465
6 0.0004416047
p_loo_aam_to_hdl <- mr_leaveoneout_plot(res_loo_aam_to_hdl)
p_loo_aam_to_hdl[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

# Steiger directionality
out_aam_to_hdl <- directionality_test(data_aam_to_hdl)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_aam_to_hdl
  id.exposure       id.outcome                         exposure
1  ieu-a-1095 ebi-a-GCST002223 Age at menarche || id:ieu-a-1095
                                 outcome snp_r2.exposure snp_r2.outcome
1 HDL cholesterol || id:ebi-a-GCST002223      0.02548295    0.001443805
  correct_causal_direction steiger_pval
1                     TRUE 6.19622e-207
#############################
###Plot results for AAM_to_TG

data_aam_to_tg <- harmonised_results[["ebi-a-GCST002216"]]
res_aam_to_tg <- mr_results_aam_to_lipids[["ebi-a-GCST002216"]]

#scatter plot

p1_res_aam_to_tg <- mr_scatter_plot(res_aam_to_tg, data_aam_to_tg)
p1_res_aam_to_tg[[1]]

# Heterogeneity & pleiotropy
mr_heterogeneity(data_aam_to_tg)
  id.exposure       id.outcome                              outcome
1  ieu-a-1095 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
2  ieu-a-1095 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
                          exposure                    method        Q Q_df
1 Age at menarche || id:ieu-a-1095                  MR Egger 93.44222   51
2 Age at menarche || id:ieu-a-1095 Inverse variance weighted 94.13350   52
       Q_pval
1 0.000267592
2 0.000313809
mr_pleiotropy_test(data_aam_to_tg)
  id.exposure       id.outcome                              outcome
1  ieu-a-1095 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
                          exposure egger_intercept          se      pval
1 Age at menarche || id:ieu-a-1095    -0.002165198 0.003524994 0.5417862
# Single-SNP MR
res_single_aam_to_tg <- mr_singlesnp(data_aam_to_tg)
head(res_single_aam_to_tg)
                          exposure                              outcome
1 Age at menarche || id:ieu-a-1095 Triglycerides || id:ebi-a-GCST002216
2 Age at menarche || id:ieu-a-1095 Triglycerides || id:ebi-a-GCST002216
3 Age at menarche || id:ieu-a-1095 Triglycerides || id:ebi-a-GCST002216
4 Age at menarche || id:ieu-a-1095 Triglycerides || id:ebi-a-GCST002216
5 Age at menarche || id:ieu-a-1095 Triglycerides || id:ebi-a-GCST002216
6 Age at menarche || id:ieu-a-1095 Triglycerides || id:ebi-a-GCST002216
  id.exposure       id.outcome samplesize        SNP           b         se
1  ieu-a-1095 ebi-a-GCST002216      94595 rs10144321 -0.12142857 0.12619048
2  ieu-a-1095 ebi-a-GCST002216      94595 rs10483727 -0.08108108 0.09189189
3  ieu-a-1095 ebi-a-GCST002216      94595 rs10840031 -0.06578947 0.09473684
4  ieu-a-1095 ebi-a-GCST002216      94595 rs10938397 -0.21315789 0.09210526
5  ieu-a-1095 ebi-a-GCST002216      94595 rs11022756 -0.17916667 0.10833333
6  ieu-a-1095 ebi-a-GCST002216      94595 rs11715566 -0.06538462 0.09038462
           p
1 0.33591693
2 0.37758598
3 0.48740353
4 0.02065205
5 0.09815878
6 0.46943156
p2_res_single_aam_to_tg <- mr_forest_plot(res_single_aam_to_tg)
p2_res_single_aam_to_tg[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_res_single_aam_to_tg <- mr_funnel_plot(res_single_aam_to_tg)
p4_res_single_aam_to_tg[[1]]

# Leave-one-out
res_loo_aam_to_tg <- mr_leaveoneout(data_aam_to_tg)
head(res_loo_aam_to_tg)
                          exposure                              outcome
1 Age at menarche || id:ieu-a-1095 Triglycerides || id:ebi-a-GCST002216
2 Age at menarche || id:ieu-a-1095 Triglycerides || id:ebi-a-GCST002216
3 Age at menarche || id:ieu-a-1095 Triglycerides || id:ebi-a-GCST002216
4 Age at menarche || id:ieu-a-1095 Triglycerides || id:ebi-a-GCST002216
5 Age at menarche || id:ieu-a-1095 Triglycerides || id:ebi-a-GCST002216
6 Age at menarche || id:ieu-a-1095 Triglycerides || id:ebi-a-GCST002216
  id.exposure       id.outcome samplesize        SNP           b         se
1  ieu-a-1095 ebi-a-GCST002216      94595 rs10144321 -0.03663803 0.02016919
2  ieu-a-1095 ebi-a-GCST002216      94595 rs10483727 -0.03665182 0.02031813
3  ieu-a-1095 ebi-a-GCST002216      94595 rs10840031 -0.03710289 0.02031713
4  ieu-a-1095 ebi-a-GCST002216      94595 rs10938397 -0.03316708 0.01993546
5  ieu-a-1095 ebi-a-GCST002216      94595 rs11022756 -0.03512031 0.02007976
6  ieu-a-1095 ebi-a-GCST002216      94595 rs11715566 -0.03704328 0.02034149
           p
1 0.06928848
2 0.07124744
3 0.06782203
4 0.09616784
5 0.08028410
6 0.06859626
p_loo_aam_to_tg <- mr_leaveoneout_plot(res_loo_aam_to_tg)
p_loo_aam_to_tg[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

# Steiger directionality
out_aam_to_tg <- directionality_test(data_aam_to_tg)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_aam_to_tg
  id.exposure       id.outcome                         exposure
1  ieu-a-1095 ebi-a-GCST002216 Age at menarche || id:ieu-a-1095
                               outcome snp_r2.exposure snp_r2.outcome
1 Triglycerides || id:ebi-a-GCST002216      0.02548295    0.001328211
  correct_causal_direction  steiger_pval
1                     TRUE 3.802734e-212
#############################
###Plot results for AAM_to_TC

data_aam_to_tc <- harmonised_results[["ebi-a-GCST002221"]]
res_aam_to_tc <- mr_results_aam_to_lipids[["ebi-a-GCST002221"]]

#scatter plot
p1_res_aam_to_tc <- mr_scatter_plot(res_aam_to_tc, data_aam_to_tc)
p1_res_aam_to_tc[[1]]

# Heterogeneity & pleiotropy
mr_heterogeneity(data_aam_to_tc)
  id.exposure       id.outcome                                   outcome
1  ieu-a-1095 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
2  ieu-a-1095 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
                          exposure                    method        Q Q_df
1 Age at menarche || id:ieu-a-1095                  MR Egger 99.17389   51
2 Age at menarche || id:ieu-a-1095 Inverse variance weighted 99.24734   52
        Q_pval
1 6.208624e-05
2 8.694777e-05
mr_pleiotropy_test(data_aam_to_tc)
  id.exposure       id.outcome                                   outcome
1  ieu-a-1095 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
                          exposure egger_intercept          se     pval
1 Age at menarche || id:ieu-a-1095   -0.0007638566 0.003930419 0.846678
# Single-SNP MR
res_single_aam_to_tc <- mr_singlesnp(data_aam_to_tc)
head(res_single_aam_to_tc)
                          exposure                                   outcome
1 Age at menarche || id:ieu-a-1095 Cholesterol, total || id:ebi-a-GCST002221
2 Age at menarche || id:ieu-a-1095 Cholesterol, total || id:ebi-a-GCST002221
3 Age at menarche || id:ieu-a-1095 Cholesterol, total || id:ebi-a-GCST002221
4 Age at menarche || id:ieu-a-1095 Cholesterol, total || id:ebi-a-GCST002221
5 Age at menarche || id:ieu-a-1095 Cholesterol, total || id:ebi-a-GCST002221
6 Age at menarche || id:ieu-a-1095 Cholesterol, total || id:ebi-a-GCST002221
  id.exposure       id.outcome samplesize        SNP           b         se
1  ieu-a-1095 ebi-a-GCST002221      94595 rs10144321  0.13571429 0.13809524
2  ieu-a-1095 ebi-a-GCST002221      94595 rs10483727  0.02162162 0.10000000
3  ieu-a-1095 ebi-a-GCST002221      94595 rs10840031 -0.03421053 0.10000000
4  ieu-a-1095 ebi-a-GCST002221      94595 rs10938397 -0.14473684 0.09736842
5  ieu-a-1095 ebi-a-GCST002221      94595 rs11022756  0.06666667 0.11875000
6  ieu-a-1095 ebi-a-GCST002221      94595 rs11715566  0.02500000 0.09807692
          p
1 0.3257263
2 0.8288192
3 0.7322717
4 0.1371505
5 0.5745225
6 0.7987988
p2_res_single_aam_to_tc <- mr_forest_plot(res_single_aam_to_tc)
p2_res_single_aam_to_tc[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_res_single_aam_to_tc <- mr_funnel_plot(res_single_aam_to_tc)
p4_res_single_aam_to_tc[[1]]

# Leave-one-out
res_loo_aam_to_tc <- mr_leaveoneout(data_aam_to_tc)
head(res_loo_aam_to_tc)
                          exposure                                   outcome
1 Age at menarche || id:ieu-a-1095 Cholesterol, total || id:ebi-a-GCST002221
2 Age at menarche || id:ieu-a-1095 Cholesterol, total || id:ebi-a-GCST002221
3 Age at menarche || id:ieu-a-1095 Cholesterol, total || id:ebi-a-GCST002221
4 Age at menarche || id:ieu-a-1095 Cholesterol, total || id:ebi-a-GCST002221
5 Age at menarche || id:ieu-a-1095 Cholesterol, total || id:ebi-a-GCST002221
6 Age at menarche || id:ieu-a-1095 Cholesterol, total || id:ebi-a-GCST002221
  id.exposure       id.outcome samplesize        SNP          b         se
1  ieu-a-1095 ebi-a-GCST002221      94595 rs10144321 0.01144708 0.02238989
2  ieu-a-1095 ebi-a-GCST002221      94595 rs10483727 0.01289296 0.02261984
3  ieu-a-1095 ebi-a-GCST002221      94595 rs10840031 0.01436103 0.02259448
4  ieu-a-1095 ebi-a-GCST002221      94595 rs10938397 0.01750096 0.02232681
5  ieu-a-1095 ebi-a-GCST002221      94595 rs11022756 0.01212565 0.02251115
6  ieu-a-1095 ebi-a-GCST002221      94595 rs11715566 0.01279141 0.02263075
          p
1 0.6091683
2 0.5686883
3 0.5250377
4 0.4331258
5 0.5901278
6 0.5719224
p_loo_aam_to_tc <- mr_leaveoneout_plot(res_loo_aam_to_tc)
p_loo_aam_to_tc[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

# Steiger directionality
out_aam_to_tc <- directionality_test(data_aam_to_tc)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_aam_to_tc
  id.exposure       id.outcome                         exposure
1  ieu-a-1095 ebi-a-GCST002221 Age at menarche || id:ieu-a-1095
                                    outcome snp_r2.exposure snp_r2.outcome
1 Cholesterol, total || id:ebi-a-GCST002221      0.02548295    0.001376164
  correct_causal_direction  steiger_pval
1                     TRUE 5.979091e-210

4.6.1 Results for Forward MR (AAM → Lipids)

4.6.2 LDL cholesterol (AAM → LDL)

Method β SE p-value
IVW 0.0061 0.0208 0.7683 Not significant
Weighted median 0.0084 0.0260 0.7420 Not significant
MR-Egger -0.0272 0.0805 0.7366 Not significant
Simple mode -0.0092 0.0530 0.8614 Not significant
Weighted mode -0.0024 0.0450 0.9542 Not significant

As seen on the table above and MR scatter plot, the estimates lie close to 0 and are insignificant, suggesting no causal effect of AAM to LDL levels.

Sensitivity analyses

  • Heterogeneity -> Significant heterogeneity was observed ( MR Egger and IVW Qp-values 0.0047 and 0.0039 respectively), indicating inconsistent SNP effects and suggesting possible pleiotropic effects.

  • MR-Egger pleiotropy test -> The MR egger intercept was not significant (p-value 0.67), indicating no evidence of directional pleiotropy.

  • Steiger directionality test -> p = 3.503484e-224, significant, causal direction is correct, AAM to LDL.

  • Single SNP analysis (and the forest plots) -> A few SNPs are significant but the majority are non significant (p-values >0.05 and CI crossing 0). The effect sizes go in both positive and negative directions and with most of them close to 0. MR-Egger and IVW summary estimates overlap but also cross 0, thus not significant, indicating no causal effect of age at menarche on LDL.

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the estimates are more than 0 except one with the confidence intervals crossing 0, indicating no SNP shifts/drives the effect.

Conclusion: The MR analysis provides no evidence that age at menarche has a causal effect on LDL cholesterol.

4.6.2.1 HDL cholesterol (AAM → HDL)

Method β SE p-value
IVW 0.0723 0.0197 0.0002 Significant
Weighted median 0.0771 0.0251 0.0017 Significant
MR-Egger 0.1116 0.0760 0.1480 Not significant
Simple mode 0.0383 0.0588 0.5169 Not significant
Weighted mode 0.0519 0.0541 0.3417 Not significant

As seen on the table above and MR scatter plot, the beta estimates suggest that later AAM increases HDL cholesterol but all the estimates are negative except for IVW and Weighted Median. The significance suggest that higher later age of menarche is associated with higher HDL.

Sensitivity analyses

  • Heterogeneity -> Significant heterogeneity was observed (MR Egger and IVW Qp-values 0.001 and 0.0012 respectively), indicating inconsistent SNP effects and suggesting possible pleiotropic effects.

  • MR-Egger pleiotropy test -> The MR egger intercept was not significant (p-value 0.594), indicating no evidence of directional pleiotropy.

  • Steiger directionality test -> p = 6.19622e-207, significant, causal direction is correct, AAM to HDL.

  • Single SNP analysis (and the forest plots) -> A few SNPs are significant but the majority are non significant (p-values >0.05 and CI crossing 0). The effect sizes go in both positive and negative directions and with most of them close to 0. MR-Egger and IVW summary estimates overlap, with MR-Egger crossing 0.

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the estimates are more than 0 except one with the confidence intervals crossing 0, indicating no SNP shifts/drives the effect.

Conclusion: Age at menarche has a positive causal effect on HDL cholesterol.

4.6.2.2 Triglycerides (AAM →TG)

Method β SE p-value
IVW -0.0378 0.0199 0.0573 Not significant
Weighted median -0.0422 0.0231 0.0581 Not significant
MR-Egger 0.0076 0.0766 0.9210 Not significant
Simple mode -0.0340 0.0494 0.4943 Not significant
Weighted mode -0.0300 0.0382 0.4346 Not significant

The MR estimates from the table above are show that age of menarche has no causal effect on TG levels. The scatter plot shows no clear linear relationship between SNP effects on age at menarche and TG levels.

  • Heterogeneity -> Significant heterogeneity was observed (MR Egger and IVW Qp-values 0.00027 and 0.00031 respectively), indicating inconsistent SNP effects.

  • MR-Egger pleiotropy test -> The MR egger intercept was not significant (p-value 0.542 ), indicating no evidence of directional horizontal pleiotropy.

  • Steiger directionality test -> p = 3.8 × 10⁻²¹², significant, causal direction is correct, AAM to TG.

  • Single SNP analysis (and the forest plots) -> A few SNPs are significant but the majority are non significant (p-values >0.05 and CI crossing 0). The effect sizes go in both positive and negative directions and with most of them close to 0. MR-Egger and IVW summary estimates overlap, with MR-Egger crossing 0.

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the estimates are more than 0 except one with the confidence intervals crossing 0, indicating no SNP shifts/drives the effect.

Conclusion: The MR analyses show no direct causal relationship of age at menarche on TG levels.

4.6.2.3 Total Cholesterol (AAM → TC)

Method β SE p-value
IVW 1.311659e-02 0.0221 0.5531 Not significant
Weighted median 1.878874e-03 0.0259 0.9422 Not significant
MR-Egger 2.914114e-02 0.0854 0.7343 Not significant
Simple mode -1.998854e-02 0.0518 0.7014 Not significant
Weighted mode 2.152908e-05 0.0421 0.9996 Not significant

The MR estimates from the table above are show that age of menarche has no causal effect on Tc levels. The scatter plot shows no clear linear relationship between SNP effects on age at menarche and TClevels.

  • Heterogeneity -> Significant heterogeneity was observed (MR Egger and IVW Qp-values 6.2 × 10⁻⁵and 8.7 × 10⁻⁵ respectively), indicating inconsistent SNP effects.

  • MR-Egger pleiotropy test -> The MR egger intercept was not significant (p-value 0.8467), indicating no evidence of directional horizontal pleiotropy.

  • Steiger directionality test -> p = 6 × 10⁻²¹⁰, significant, causal direction is correct, AAM to TC.

  • Single SNP analysis (and the forest plots) -> A few SNPs are significant but the majority are non significant (p-values >0.05 and CI crossing 0). The effect sizes go in both positive and negative directions and with most of them close to 0. MR-Egger and IVW summary estimates overlap and cross 0.

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the estimates are more than 0 except one with the confidence intervals crossing 0, indicating no SNP shifts/drives the effect.

Conclusion: The MR analyses show no direct causal relationship of age at menarche on TC levels.

4.6.3 Forward Multivariable MR (MVMR)

Direction: AAM + BMI → HDL or LDL or TG or TC)
Exposures: Age at Menarche, Body Mass Index
Outcome: HDL, LDL, TG and TC
Research Question: Does age at menarche influence the each lipid level independent of BMI? and does BMI affect the AMM independent of each lipid level.

######################################################
# Multivariable MR: AAM + BMI -> Lipids 
######################################################

# 1. Extract multivariable exposures
exp_mvmr_bmi_aam_to_lipids <- mv_extract_exposures(
  id_exposure = c(
    "ieu-a-1095",  # AAM
    "ieu-a-2"      # BMI
  ),
  clump_r2 = 0.001,
  clump_kb = 10000,
  pop = "EUR"
)
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping 1, 145 variants, using EUR population reference
Removing 24 of 145 variants due to LD with other variants or absence from LD reference panel
Extracting data for 121 SNP(s) from 2 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 4
Querying variant chunk 2 of 4
Querying variant chunk 3 of 4
Querying variant chunk 4 of 4
Harmonising Age at menarche || id:ieu-a-1095 (ieu-a-1095) and Body mass index || id:ieu-a-2 (ieu-a-2)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs1518080, rs1558902, rs1874984, rs4242496, rs4801589, rs9373571
# Storage objects
mvmr_results_bmi_aam_to_lipids <- list()
mvmr_data_bmi_aam_to_lipids    <- list()

# 2. Loop over lipid outcomes
for(lipid in lipids){

  # Outcome = lipid
  out_mvmr_bmi_aam_to_lipid <- extract_outcome_data(
    snps     = exp_mvmr_bmi_aam_to_lipids$SNP,
    outcomes = lipid
  )

  # Harmonise
  mv_dat_bmi_aam_to_lipid <- mv_harmonise_data(
    exposure_dat = exp_mvmr_bmi_aam_to_lipids,
    outcome_dat  = out_mvmr_bmi_aam_to_lipid
  )

  # Store harmonised data
  if (is.data.frame(mv_dat_bmi_aam_to_lipid)) {
  mvmr_data_bmi_aam_to_lipids[[lipid]] <- mv_dat_bmi_aam_to_lipid
} else {
  mvmr_data_bmi_aam_to_lipids[[lipid]] <- NA
}

  # Run MVMR
 if (!is.null(mv_dat_bmi_aam_to_lipid) &&
    is.data.frame(mv_dat_bmi_aam_to_lipid) &&
    !is.na(nrow(mv_dat_bmi_aam_to_lipid)) &&
    nrow(mv_dat_bmi_aam_to_lipid) > 3) {

  res_mvmr <- mv_multiple(mv_dat_bmi_aam_to_lipid)

} else {
  res_mvmr <- NA
}

  # Store results
  mvmr_results_bmi_aam_to_lipids[[lipid]] <- res_mvmr
}
Extracting data for 115 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 1 SNPs in outcome ebi-a-GCST002222
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Age at menarche || id:ieu-a-1095 (ieu-a-1095) and LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs1079866, rs14810, rs17001654, rs2617056, rs2836950, rs3914188, rs9304665, rs9555810, rs9579083, rs9914578
Extracting data for 115 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 1 SNPs in outcome ebi-a-GCST002223
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Age at menarche || id:ieu-a-1095 (ieu-a-1095) and HDL cholesterol || id:ebi-a-GCST002223 (ebi-a-GCST002223)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs1079866, rs14810, rs17001654, rs2617056, rs2836950, rs3914188, rs9304665, rs9555810, rs9579083, rs9914578
Extracting data for 115 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 1 SNPs in outcome ebi-a-GCST002216
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Age at menarche || id:ieu-a-1095 (ieu-a-1095) and Triglycerides || id:ebi-a-GCST002216 (ebi-a-GCST002216)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs1079866, rs14810, rs17001654, rs2617056, rs2836950, rs3914188, rs9304665, rs9555810, rs9579083, rs9914578
Extracting data for 115 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 2 SNPs in outcome ebi-a-GCST002221
Extracting data for 2 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Age at menarche || id:ieu-a-1095 (ieu-a-1095) and Cholesterol, total || id:ebi-a-GCST002221 (ebi-a-GCST002221)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs1079866, rs14810, rs17001654, rs2617056, rs2836950, rs3914188, rs9304665, rs9555810, rs9579083, rs9914578
# Plot MVMR for all lipids
lipid_names <- c(
  "ebi-a-GCST002222" = "LDL Cholesterol",
  "ebi-a-GCST002223" = "HDL Cholesterol",
  "ebi-a-GCST002216" = "Triglycerides",
  "ebi-a-GCST002221" = "Total Cholesterol"
)

for(lipid in lipids){

  res_obj <- mvmr_results_bmi_aam_to_lipids[[lipid]]

  # Skip if result is missing, NA, or malformed
  if (is.null(res_obj) || is.na(res_obj)[1] || !is.list(res_obj) || !"result" %in% names(res_obj)) {
    message(paste("Skipping", lipid, "- no valid MVMR result"))
    next
  }

  res_mvmr <- res_obj$result

  p <- ggplot(res_mvmr, aes(x = exposure, y = b)) +
    geom_point(size = 3) +
    geom_errorbar(
      aes(ymin = b - 1.96 * se, ymax = b + 1.96 * se),
      width = 0.1
    ) +
    theme_bw() +
    labs(
      title = paste("MVMR: Direct effects of AAM and BMI on", lipid_names[lipid]),
      x = "Exposure",
      y = "Effect on Lipid"
    )

  print(p)
}
Skipping ebi-a-GCST002222 - no valid MVMR result
Skipping ebi-a-GCST002223 - no valid MVMR result
Skipping ebi-a-GCST002216 - no valid MVMR result
Skipping ebi-a-GCST002221 - no valid MVMR result
nrow(out_mvmr_bmi_aam_to_lipid)
[1] 114
nrow(mv_dat_bmi_aam_to_lipid)
NULL

4.6.3.1 Results for Multivariable MR (AAM +BMI → HDL or LDL or TG or TC)

Although the outcome data was extracted for all the lipid traits, MV harmonisation failed because no SNPs had valid association estimates for the three AAM, BMI and lipid outcome. Therefore, MVMR could not be performed due to insufficient lipid overlaps.

4.7 Reverse MR

Direction: Lipids → AAM Exposures: Lipid Traits, Body Mass Index Outcome: Age at Menarche Research Question: Do lipid levels influence age at menarche independent of BMI? and does BMI influence AAM independent of each lipid level.

####################################
# Reverse MR: Lipids → Age at Menarche
####################################

mr_results_lipids_to_aam <- list()
harmonised_results_lipids_to_aam <- list()


for(lipid in lipids){

  # 1. Extract instruments for each lipid (WITH clumping)
  exp_lipid <- extract_instruments(
    outcomes = lipid,
    clump = TRUE,
    r2 = 0.001,
    kb = 10000
  )
  
  exp_lipid$F_statistic <- (exp_lipid$beta.exposure^2) / (exp_lipid$se.exposure^2)
  summary(exp_lipid$F_statistic)

  # 2. Extract AAM as outcome
  out_aam <- extract_outcome_data(
    snps     = exp_lipid$SNP,
    outcomes = "ieu-a-1095"
  )

  # 3. Harmonise
  dat_lipid_to_aam <- harmonise_data(
    exposure_dat = exp_lipid,
    outcome_dat  = out_aam
  )

  harmonised_results_lipids_to_aam[[lipid]] <- dat_lipid_to_aam

  # 4. Run MR
  if(nrow(dat_lipid_to_aam) > 3){
    res_lipid_to_aam <- mr(dat_lipid_to_aam)
  } else {
    res_lipid_to_aam <- NA
  }

  mr_results_lipids_to_aam[[lipid]] <- res_lipid_to_aam
}
Extracting data for 75 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 8 SNPs in outcome ieu-a-1095
Extracting data for 8 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222) and Age at menarche || id:ieu-a-1095 (ieu-a-1095)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs2954029, rs3758348, rs964184
Analysing 'ebi-a-GCST002222' on 'ieu-a-1095'
Extracting data for 87 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 4 SNPs in outcome ieu-a-1095
Extracting data for 4 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising HDL cholesterol || id:ebi-a-GCST002223 (ebi-a-GCST002223) and Age at menarche || id:ieu-a-1095 (ieu-a-1095)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs9491696
Analysing 'ebi-a-GCST002223' on 'ieu-a-1095'
Extracting data for 56 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Finding proxies for 1 SNPs in outcome ieu-a-1095
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Triglycerides || id:ebi-a-GCST002216 (ebi-a-GCST002216) and Age at menarche || id:ieu-a-1095 (ieu-a-1095)
Analysing 'ebi-a-GCST002216' on 'ieu-a-1095'
Extracting data for 88 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 3 SNPs in outcome ieu-a-1095
Extracting data for 3 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Cholesterol, total || id:ebi-a-GCST002221 (ebi-a-GCST002221) and Age at menarche || id:ieu-a-1095 (ieu-a-1095)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs2156552, rs2954029, rs3758348, rs378479, rs581080
Analysing 'ebi-a-GCST002221' on 'ieu-a-1095'
mr_results_lipids_to_aam
$`ebi-a-GCST002222`
       id.exposure id.outcome                          outcome
1 ebi-a-GCST002222 ieu-a-1095 Age at menarche || id:ieu-a-1095
2 ebi-a-GCST002222 ieu-a-1095 Age at menarche || id:ieu-a-1095
3 ebi-a-GCST002222 ieu-a-1095 Age at menarche || id:ieu-a-1095
4 ebi-a-GCST002222 ieu-a-1095 Age at menarche || id:ieu-a-1095
5 ebi-a-GCST002222 ieu-a-1095 Age at menarche || id:ieu-a-1095
                                exposure                    method nsnp
1 LDL cholesterol || id:ebi-a-GCST002222                  MR Egger   65
2 LDL cholesterol || id:ebi-a-GCST002222           Weighted median   65
3 LDL cholesterol || id:ebi-a-GCST002222 Inverse variance weighted   65
4 LDL cholesterol || id:ebi-a-GCST002222               Simple mode   65
5 LDL cholesterol || id:ebi-a-GCST002222             Weighted mode   65
             b         se      pval
1  0.040266363 0.03303937 0.2274874
2  0.002013408 0.02666752 0.9398166
3 -0.012035157 0.01846719 0.5145917
4 -0.013238269 0.05155728 0.7981814
5  0.001861241 0.02710245 0.9454630

$`ebi-a-GCST002223`
       id.exposure id.outcome                          outcome
1 ebi-a-GCST002223 ieu-a-1095 Age at menarche || id:ieu-a-1095
2 ebi-a-GCST002223 ieu-a-1095 Age at menarche || id:ieu-a-1095
3 ebi-a-GCST002223 ieu-a-1095 Age at menarche || id:ieu-a-1095
4 ebi-a-GCST002223 ieu-a-1095 Age at menarche || id:ieu-a-1095
5 ebi-a-GCST002223 ieu-a-1095 Age at menarche || id:ieu-a-1095
                                exposure                    method nsnp
1 HDL cholesterol || id:ebi-a-GCST002223                  MR Egger   86
2 HDL cholesterol || id:ebi-a-GCST002223           Weighted median   86
3 HDL cholesterol || id:ebi-a-GCST002223 Inverse variance weighted   86
4 HDL cholesterol || id:ebi-a-GCST002223               Simple mode   86
5 HDL cholesterol || id:ebi-a-GCST002223             Weighted mode   86
             b         se      pval
1 -0.010185553 0.02789236 0.7158997
2 -0.018303896 0.02447641 0.4545701
3  0.001517671 0.01695029 0.9286555
4  0.054457953 0.04486527 0.2281818
5 -0.009033611 0.02173885 0.6787854

$`ebi-a-GCST002216`
       id.exposure id.outcome                          outcome
1 ebi-a-GCST002216 ieu-a-1095 Age at menarche || id:ieu-a-1095
2 ebi-a-GCST002216 ieu-a-1095 Age at menarche || id:ieu-a-1095
3 ebi-a-GCST002216 ieu-a-1095 Age at menarche || id:ieu-a-1095
4 ebi-a-GCST002216 ieu-a-1095 Age at menarche || id:ieu-a-1095
5 ebi-a-GCST002216 ieu-a-1095 Age at menarche || id:ieu-a-1095
                              exposure                    method nsnp
1 Triglycerides || id:ebi-a-GCST002216                  MR Egger   55
2 Triglycerides || id:ebi-a-GCST002216           Weighted median   55
3 Triglycerides || id:ebi-a-GCST002216 Inverse variance weighted   55
4 Triglycerides || id:ebi-a-GCST002216               Simple mode   55
5 Triglycerides || id:ebi-a-GCST002216             Weighted mode   55
            b         se       pval
1  0.08451449 0.03928787 0.03604131
2  0.04138325 0.03183103 0.19356970
3  0.01686108 0.02466050 0.49414662
4 -0.02585981 0.05626990 0.64767164
5  0.02968455 0.03079322 0.33934507

$`ebi-a-GCST002221`
       id.exposure id.outcome                          outcome
1 ebi-a-GCST002221 ieu-a-1095 Age at menarche || id:ieu-a-1095
2 ebi-a-GCST002221 ieu-a-1095 Age at menarche || id:ieu-a-1095
3 ebi-a-GCST002221 ieu-a-1095 Age at menarche || id:ieu-a-1095
4 ebi-a-GCST002221 ieu-a-1095 Age at menarche || id:ieu-a-1095
5 ebi-a-GCST002221 ieu-a-1095 Age at menarche || id:ieu-a-1095
                                   exposure                    method nsnp
1 Cholesterol, total || id:ebi-a-GCST002221                  MR Egger   81
2 Cholesterol, total || id:ebi-a-GCST002221           Weighted median   81
3 Cholesterol, total || id:ebi-a-GCST002221 Inverse variance weighted   81
4 Cholesterol, total || id:ebi-a-GCST002221               Simple mode   81
5 Cholesterol, total || id:ebi-a-GCST002221             Weighted mode   81
            b         se      pval
1 0.054829073 0.03668612 0.1390170
2 0.028716469 0.02574634 0.2646956
3 0.008875248 0.01841550 0.6298454
4 0.014762344 0.04770790 0.7577975
5 0.024110408 0.03065167 0.4338438
#############################
###Visualization: LDL to AAM
data_ldl_to_aam <- harmonised_results_lipids_to_aam[["ebi-a-GCST002222"]]
res_ldl_to_aam  <- mr_results_lipids_to_aam[["ebi-a-GCST002222"]]

# Scatter
p1_ldl_to_aam <- mr_scatter_plot(res_ldl_to_aam, data_ldl_to_aam)
p1_ldl_to_aam[[1]]

# Heterogeneity & pleiotropy
mr_heterogeneity(data_ldl_to_aam)
       id.exposure id.outcome                          outcome
1 ebi-a-GCST002222 ieu-a-1095 Age at menarche || id:ieu-a-1095
2 ebi-a-GCST002222 ieu-a-1095 Age at menarche || id:ieu-a-1095
                                exposure                    method        Q
1 LDL cholesterol || id:ebi-a-GCST002222                  MR Egger 71.85361
2 LDL cholesterol || id:ebi-a-GCST002222 Inverse variance weighted 75.93836
  Q_df    Q_pval
1   63 0.2080153
2   64 0.1459340
mr_pleiotropy_test(data_ldl_to_aam)
       id.exposure id.outcome                          outcome
1 ebi-a-GCST002222 ieu-a-1095 Age at menarche || id:ieu-a-1095
                                exposure egger_intercept         se       pval
1 LDL cholesterol || id:ebi-a-GCST002222    -0.003245848 0.00171514 0.06302523
# Single SNP + Forest + Funnel
res_single_ldl_to_aam <- mr_singlesnp(data_ldl_to_aam)
head(res_single_ldl_to_aam)
                                exposure                          outcome
1 LDL cholesterol || id:ebi-a-GCST002222 Age at menarche || id:ieu-a-1095
2 LDL cholesterol || id:ebi-a-GCST002222 Age at menarche || id:ieu-a-1095
3 LDL cholesterol || id:ebi-a-GCST002222 Age at menarche || id:ieu-a-1095
4 LDL cholesterol || id:ebi-a-GCST002222 Age at menarche || id:ieu-a-1095
5 LDL cholesterol || id:ebi-a-GCST002222 Age at menarche || id:ieu-a-1095
6 LDL cholesterol || id:ebi-a-GCST002222 Age at menarche || id:ieu-a-1095
       id.exposure id.outcome samplesize        SNP           b        se
1 ebi-a-GCST002222 ieu-a-1095     182416 rs10195252 -0.14705882 0.2460164
2 ebi-a-GCST002222 ieu-a-1095     182416  rs1030431 -0.26162791 0.1727942
3 ebi-a-GCST002222 ieu-a-1095     182416 rs10832962 -0.17187500 0.2086131
4 ebi-a-GCST002222 ieu-a-1095     182416 rs10947332 -0.31746032 0.1764534
5 ebi-a-GCST002222 ieu-a-1095     182416 rs11065987 -0.24535316 0.2224290
6 ebi-a-GCST002222 ieu-a-1095     182416 rs11220462 -0.02711864 0.1433951
           p
1 0.54999990
2 0.13000014
3 0.41000007
4 0.07200013
5 0.26999988
6 0.85000005
p2_ldl_to_aam <- mr_forest_plot(res_single_ldl_to_aam)
p2_ldl_to_aam[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_ldl_to_aam <- mr_funnel_plot(res_single_ldl_to_aam)
p4_ldl_to_aam[[1]]

# Leave-one-out
res_loo_ldl_to_aam <- mr_leaveoneout(data_ldl_to_aam)
head(res_loo_ldl_to_aam)
                                exposure                          outcome
1 LDL cholesterol || id:ebi-a-GCST002222 Age at menarche || id:ieu-a-1095
2 LDL cholesterol || id:ebi-a-GCST002222 Age at menarche || id:ieu-a-1095
3 LDL cholesterol || id:ebi-a-GCST002222 Age at menarche || id:ieu-a-1095
4 LDL cholesterol || id:ebi-a-GCST002222 Age at menarche || id:ieu-a-1095
5 LDL cholesterol || id:ebi-a-GCST002222 Age at menarche || id:ieu-a-1095
6 LDL cholesterol || id:ebi-a-GCST002222 Age at menarche || id:ieu-a-1095
       id.exposure id.outcome samplesize        SNP            b         se
1 ebi-a-GCST002222 ieu-a-1095     182416 rs10195252 -0.011390884 0.01862032
2 ebi-a-GCST002222 ieu-a-1095     182416  rs1030431 -0.009609133 0.01844216
3 ebi-a-GCST002222 ieu-a-1095     182416 rs10832962 -0.010972483 0.01860214
4 ebi-a-GCST002222 ieu-a-1095     182416 rs10947332 -0.009189431 0.01832359
5 ebi-a-GCST002222 ieu-a-1095     182416 rs11065987 -0.010671779 0.01853095
6 ebi-a-GCST002222 ieu-a-1095     182416 rs11220462 -0.011821328 0.01874327
          p
1 0.5407065
2 0.6023377
3 0.5552909
4 0.6160134
5 0.5646900
6 0.5282384
p_loo_ldl_to_aam <- mr_leaveoneout_plot(res_loo_ldl_to_aam)
p_loo_ldl_to_aam[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

# Steiger
out_ldl_to_aam <- directionality_test(data_ldl_to_aam)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_ldl_to_aam
       id.exposure id.outcome                               exposure
1 ebi-a-GCST002222 ieu-a-1095 LDL cholesterol || id:ebi-a-GCST002222
                           outcome snp_r2.exposure snp_r2.outcome
1 Age at menarche || id:ieu-a-1095      0.08177302   0.0004304678
  correct_causal_direction steiger_pval
1                     TRUE            0
#############################
###Visualization: HDL to AAM
data_hdl_to_aam <- harmonised_results_lipids_to_aam[["ebi-a-GCST002223"]]
res_hdl_to_aam  <- mr_results_lipids_to_aam[["ebi-a-GCST002223"]]

p1_hdl_to_aam <- mr_scatter_plot(res_hdl_to_aam, data_hdl_to_aam)
p1_hdl_to_aam[[1]]

#heterogeneity
mr_heterogeneity(data_hdl_to_aam)
       id.exposure id.outcome                          outcome
1 ebi-a-GCST002223 ieu-a-1095 Age at menarche || id:ieu-a-1095
2 ebi-a-GCST002223 ieu-a-1095 Age at menarche || id:ieu-a-1095
                                exposure                    method        Q
1 HDL cholesterol || id:ebi-a-GCST002223                  MR Egger 109.6733
2 HDL cholesterol || id:ebi-a-GCST002223 Inverse variance weighted 110.0396
  Q_df     Q_pval
1   84 0.03151563
2   85 0.03523700
#pleiotropy
mr_pleiotropy_test(data_hdl_to_aam)
       id.exposure id.outcome                          outcome
1 ebi-a-GCST002223 ieu-a-1095 Age at menarche || id:ieu-a-1095
                                exposure egger_intercept          se      pval
1 HDL cholesterol || id:ebi-a-GCST002223    0.0007364897 0.001390492 0.5977439
#Single SNP
res_single_hdl_to_aam <- mr_singlesnp(data_hdl_to_aam)
head(res_single_hdl_to_aam)
                                exposure                          outcome
1 HDL cholesterol || id:ebi-a-GCST002223 Age at menarche || id:ieu-a-1095
2 HDL cholesterol || id:ebi-a-GCST002223 Age at menarche || id:ieu-a-1095
3 HDL cholesterol || id:ebi-a-GCST002223 Age at menarche || id:ieu-a-1095
4 HDL cholesterol || id:ebi-a-GCST002223 Age at menarche || id:ieu-a-1095
5 HDL cholesterol || id:ebi-a-GCST002223 Age at menarche || id:ieu-a-1095
6 HDL cholesterol || id:ebi-a-GCST002223 Age at menarche || id:ieu-a-1095
       id.exposure id.outcome samplesize        SNP            b         se
1 ebi-a-GCST002223 ieu-a-1095     182416 rs10019888  0.259259259 0.29531889
2 ebi-a-GCST002223 ieu-a-1095     182416 rs10087900 -0.112554113 0.25585541
3 ebi-a-GCST002223 ieu-a-1095     182416 rs10282707 -0.440000000 0.23210440
4 ebi-a-GCST002223 ieu-a-1095     182416 rs10468017 -0.006785411 0.05399763
5 ebi-a-GCST002223 ieu-a-1095     182416  rs1047891  0.059479554 0.31450967
6 ebi-a-GCST002223 ieu-a-1095     182416 rs10761771  0.707070707 0.27807879
           p
1 0.38000018
2 0.66000015
3 0.05799990
4 0.90000004
5 0.85000005
6 0.01099999
p2_hdl_to_aam <- mr_forest_plot(res_single_hdl_to_aam)
p2_hdl_to_aam[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_hdl_to_aam <- mr_funnel_plot(res_single_hdl_to_aam)
p4_hdl_to_aam[[1]]

#Leoveone out analysis
res_loo_hdl_to_aam <- mr_leaveoneout(data_hdl_to_aam)
head(res_loo_hdl_to_aam)
                                exposure                          outcome
1 HDL cholesterol || id:ebi-a-GCST002223 Age at menarche || id:ieu-a-1095
2 HDL cholesterol || id:ebi-a-GCST002223 Age at menarche || id:ieu-a-1095
3 HDL cholesterol || id:ebi-a-GCST002223 Age at menarche || id:ieu-a-1095
4 HDL cholesterol || id:ebi-a-GCST002223 Age at menarche || id:ieu-a-1095
5 HDL cholesterol || id:ebi-a-GCST002223 Age at menarche || id:ieu-a-1095
6 HDL cholesterol || id:ebi-a-GCST002223 Age at menarche || id:ieu-a-1095
       id.exposure id.outcome samplesize        SNP             b         se
1 ebi-a-GCST002223 ieu-a-1095     182416 rs10019888  0.0008601150 0.01701328
2 ebi-a-GCST002223 ieu-a-1095     182416 rs10087900  0.0019057216 0.01706438
3 ebi-a-GCST002223 ieu-a-1095     182416 rs10282707  0.0033440817 0.01680166
4 ebi-a-GCST002223 ieu-a-1095     182416 rs10468017  0.0022017352 0.01773731
5 ebi-a-GCST002223 ieu-a-1095     182416  rs1047891  0.0013873322 0.01706741
6 ebi-a-GCST002223 ieu-a-1095     182416 rs10761771 -0.0005131254 0.01656692
          p
1 0.9596797
2 0.9110784
3 0.8422371
4 0.9012122
5 0.9352149
6 0.9752912
p_loo_hdl_to_aam <- mr_leaveoneout_plot(res_loo_hdl_to_aam)
p_loo_hdl_to_aam[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

#steiger 
out_hdl_to_aam <- directionality_test(data_hdl_to_aam)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_hdl_to_aam
       id.exposure id.outcome                               exposure
1 ebi-a-GCST002223 ieu-a-1095 HDL cholesterol || id:ebi-a-GCST002223
                           outcome snp_r2.exposure snp_r2.outcome
1 Age at menarche || id:ieu-a-1095      0.09493388    0.000603294
  correct_causal_direction steiger_pval
1                     TRUE            0
#############################
###Visualization: TG to AAM
data_tg_to_aam <- harmonised_results_lipids_to_aam[["ebi-a-GCST002216"]]
#mr analysis
res_tg_to_aam  <- mr_results_lipids_to_aam[["ebi-a-GCST002216"]]

p1_tg_to_aam <- mr_scatter_plot(res_tg_to_aam, data_tg_to_aam)
p1_tg_to_aam[[1]]

#heterogeneity
mr_heterogeneity(data_tg_to_aam)
       id.exposure id.outcome                          outcome
1 ebi-a-GCST002216 ieu-a-1095 Age at menarche || id:ieu-a-1095
2 ebi-a-GCST002216 ieu-a-1095 Age at menarche || id:ieu-a-1095
                              exposure                    method        Q Q_df
1 Triglycerides || id:ebi-a-GCST002216                  MR Egger 85.76877   53
2 Triglycerides || id:ebi-a-GCST002216 Inverse variance weighted 93.37045   54
       Q_pval
1 0.002927585
2 0.000707501
#pleiotropy
mr_pleiotropy_test(data_tg_to_aam)
       id.exposure id.outcome                          outcome
1 ebi-a-GCST002216 ieu-a-1095 Age at menarche || id:ieu-a-1095
                              exposure egger_intercept          se       pval
1 Triglycerides || id:ebi-a-GCST002216    -0.004035065 0.001861754 0.03472185
#single snp analysis
res_single_tg_to_aam <- mr_singlesnp(data_tg_to_aam)
head(res_single_tg_to_aam)
                              exposure                          outcome
1 Triglycerides || id:ebi-a-GCST002216 Age at menarche || id:ieu-a-1095
2 Triglycerides || id:ebi-a-GCST002216 Age at menarche || id:ieu-a-1095
3 Triglycerides || id:ebi-a-GCST002216 Age at menarche || id:ieu-a-1095
4 Triglycerides || id:ebi-a-GCST002216 Age at menarche || id:ieu-a-1095
5 Triglycerides || id:ebi-a-GCST002216 Age at menarche || id:ieu-a-1095
6 Triglycerides || id:ebi-a-GCST002216 Age at menarche || id:ieu-a-1095
       id.exposure id.outcome samplesize        SNP           b         se
1 ebi-a-GCST002216 ieu-a-1095     182416 rs10401969  0.12396694 0.10327521
2 ebi-a-GCST002216 ieu-a-1095     182416 rs10426094 -0.74688797 0.28757967
3 ebi-a-GCST002216 ieu-a-1095     182416 rs10440120 -0.09150327 0.25526863
4 ebi-a-GCST002216 ieu-a-1095     182416 rs10501321 -0.05555556 0.27517269
5 ebi-a-GCST002216 ieu-a-1095     182416 rs10790162  0.04295011 0.04996443
6 ebi-a-GCST002216 ieu-a-1095     182416 rs11057408 -0.03488372 0.23106512
            p
1 0.230001379
2 0.009400045
3 0.720000047
4 0.840000043
5 0.390001976
6 0.879999995
p2_tg_to_aam <- mr_forest_plot(res_single_tg_to_aam)
p2_tg_to_aam[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_tg_to_aam <- mr_funnel_plot(res_single_tg_to_aam)
p4_tg_to_aam[[1]]

#leaveoneout
res_loo_tg_to_aam <- mr_leaveoneout(data_tg_to_aam)
head(res_loo_tg_to_aam)
                              exposure                          outcome
1 Triglycerides || id:ebi-a-GCST002216 Age at menarche || id:ieu-a-1095
2 Triglycerides || id:ebi-a-GCST002216 Age at menarche || id:ieu-a-1095
3 Triglycerides || id:ebi-a-GCST002216 Age at menarche || id:ieu-a-1095
4 Triglycerides || id:ebi-a-GCST002216 Age at menarche || id:ieu-a-1095
5 Triglycerides || id:ebi-a-GCST002216 Age at menarche || id:ieu-a-1095
6 Triglycerides || id:ebi-a-GCST002216 Age at menarche || id:ieu-a-1095
       id.exposure id.outcome samplesize        SNP          b         se
1 ebi-a-GCST002216 ieu-a-1095     182416 rs10401969 0.01320874 0.02516169
2 ebi-a-GCST002216 ieu-a-1095     182416 rs10426094 0.02012300 0.02398030
3 ebi-a-GCST002216 ieu-a-1095     182416 rs10440120 0.01744916 0.02493528
4 ebi-a-GCST002216 ieu-a-1095     182416 rs10501321 0.01719902 0.02494077
5 ebi-a-GCST002216 ieu-a-1095     182416 rs10790162 0.01258277 0.02680994
6 ebi-a-GCST002216 ieu-a-1095     182416 rs11057408 0.01720421 0.02496770
          p
1 0.5996149
2 0.4013866
3 0.4840660
4 0.4904491
5 0.6388323
6 0.4907863
p_loo_tg_to_aam <- mr_leaveoneout_plot(res_loo_tg_to_aam)
p_loo_tg_to_aam[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

#steiger
out_tg_to_aam <- directionality_test(data_tg_to_aam)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_tg_to_aam
       id.exposure id.outcome                             exposure
1 ebi-a-GCST002216 ieu-a-1095 Triglycerides || id:ebi-a-GCST002216
                           outcome snp_r2.exposure snp_r2.outcome
1 Age at menarche || id:ieu-a-1095      0.08174223   0.0005162857
  correct_causal_direction steiger_pval
1                     TRUE            0
#############################
###Visualization of reverse: TC to AAM
data_tc_to_aam <- harmonised_results_lipids_to_aam[["ebi-a-GCST002221"]]
res_tc_to_aam  <- mr_results_lipids_to_aam[["ebi-a-GCST002221"]]

p1_tc_to_aam <- mr_scatter_plot(res_tc_to_aam, data_tc_to_aam)
p1_tc_to_aam[[1]]

#heterogeneity
mr_heterogeneity(data_tc_to_aam)
       id.exposure id.outcome                          outcome
1 ebi-a-GCST002221 ieu-a-1095 Age at menarche || id:ieu-a-1095
2 ebi-a-GCST002221 ieu-a-1095 Age at menarche || id:ieu-a-1095
                                   exposure                    method        Q
1 Cholesterol, total || id:ebi-a-GCST002221                  MR Egger 100.5692
2 Cholesterol, total || id:ebi-a-GCST002221 Inverse variance weighted 103.2275
  Q_df     Q_pval
1   79 0.05126621
2   80 0.04134778
#pleiotropy
mr_pleiotropy_test(data_tc_to_aam)
       id.exposure id.outcome                          outcome
1 ebi-a-GCST002221 ieu-a-1095 Age at menarche || id:ieu-a-1095
                                   exposure egger_intercept          se
1 Cholesterol, total || id:ebi-a-GCST002221    -0.002554082 0.001767467
       pval
1 0.1523984
#single snp analysis
res_single_tc_to_aam <- mr_singlesnp(data_tc_to_aam)
head(res_single_tc_to_aam)
                                   exposure                          outcome
1 Cholesterol, total || id:ebi-a-GCST002221 Age at menarche || id:ieu-a-1095
2 Cholesterol, total || id:ebi-a-GCST002221 Age at menarche || id:ieu-a-1095
3 Cholesterol, total || id:ebi-a-GCST002221 Age at menarche || id:ieu-a-1095
4 Cholesterol, total || id:ebi-a-GCST002221 Age at menarche || id:ieu-a-1095
5 Cholesterol, total || id:ebi-a-GCST002221 Age at menarche || id:ieu-a-1095
6 Cholesterol, total || id:ebi-a-GCST002221 Age at menarche || id:ieu-a-1095
       id.exposure id.outcome samplesize        SNP           b        se
1 ebi-a-GCST002221 ieu-a-1095     182416 rs10088180 -0.02631579 0.2995711
2 ebi-a-GCST002221 ieu-a-1095     182416 rs10468017 -0.01296596 0.1031818
3 ebi-a-GCST002221 ieu-a-1095     182416 rs10490626 -0.33734940 0.2632361
4 ebi-a-GCST002221 ieu-a-1095     182416 rs10750219 -0.17142857 0.2036886
5 ebi-a-GCST002221 ieu-a-1095     182416 rs10773003  0.37940379 0.2635607
6 ebi-a-GCST002221 ieu-a-1095     182416 rs10832962 -0.17460317 0.2119244
          p
1 0.9299999
2 0.9000000
3 0.2000017
4 0.4000002
5 0.1500001
6 0.4100001
p2_tc_to_aam <- mr_forest_plot(res_single_tc_to_aam)
p2_tc_to_aam[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_tc_to_aam <- mr_funnel_plot(res_single_tc_to_aam)
p4_tc_to_aam[[1]]

#leoveoeout analysis
res_loo_tc_to_aam <- mr_leaveoneout(data_tc_to_aam)
head(res_loo_tc_to_aam)
                                   exposure                          outcome
1 Cholesterol, total || id:ebi-a-GCST002221 Age at menarche || id:ieu-a-1095
2 Cholesterol, total || id:ebi-a-GCST002221 Age at menarche || id:ieu-a-1095
3 Cholesterol, total || id:ebi-a-GCST002221 Age at menarche || id:ieu-a-1095
4 Cholesterol, total || id:ebi-a-GCST002221 Age at menarche || id:ieu-a-1095
5 Cholesterol, total || id:ebi-a-GCST002221 Age at menarche || id:ieu-a-1095
6 Cholesterol, total || id:ebi-a-GCST002221 Age at menarche || id:ieu-a-1095
       id.exposure id.outcome samplesize        SNP           b         se
1 ebi-a-GCST002221 ieu-a-1095     182416 rs10088180 0.008978611 0.01855764
2 ebi-a-GCST002221 ieu-a-1095     182416 rs10468017 0.009428072 0.01876057
3 ebi-a-GCST002221 ieu-a-1095     182416 rs10490626 0.010193440 0.01841010
4 ebi-a-GCST002221 ieu-a-1095     182416 rs10750219 0.010024705 0.01851952
5 ebi-a-GCST002221 ieu-a-1095     182416 rs10773003 0.007468008 0.01838756
6 ebi-a-GCST002221 ieu-a-1095     182416 rs10832962 0.009955272 0.01851815
          p
1 0.6285115
2 0.6152827
3 0.5797928
4 0.5882975
5 0.6846364
6 0.5908564
p_loo_tc_to_aam <- mr_leaveoneout_plot(res_loo_tc_to_aam)
p_loo_tc_to_aam[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

#steiger
out_tc_to_aam <- directionality_test(data_tc_to_aam)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_tc_to_aam
       id.exposure id.outcome                                  exposure
1 ebi-a-GCST002221 ieu-a-1095 Cholesterol, total || id:ebi-a-GCST002221
                           outcome snp_r2.exposure snp_r2.outcome
1 Age at menarche || id:ieu-a-1095       0.1035706   0.0005798003
  correct_causal_direction steiger_pval
1                     TRUE            0

4.7.1 Results for Reverse MR (Lipids → AAM)

4.7.1.1 LDL cholesterol (LDL → AAM)

Method β (Effect) SE p-value Interpretation
MR-Egger 0.0403 0.0330 0.2275 Not significant
Weighted median 0.0020 0.0275 0.9416 Not significant
IVW -0.0120 0.0185 0.5146 Not significant
Simple mode -0.0132 0.0491 0.7881 Not significant
Weighted mode 0.0019 0.0254 0.9410 Not significant

As seen on the table above and MR scatter plot, the estimates lie close to 0 and are insignificant, suggesting no causal effect of LDL levels on AAM .

Sensitivity analyses

  • Heterogeneity -> Insignificant heterogeneity was observed ( MR Egger and IVW Qp-values 0.1459 and 0.2080 respectively), indicating consistent SNP effects and suggesting no possible pleiotropic effects.

  • MR-Egger pleiotropy test -> The MR egger intercept was not significant (p-value 0.67), indicating no evidence of directional pleiotropy.

  • Steiger directionality test -> p = 0, significant, causal direction is correct, LDL to AAM.

  • Single SNP analysis (and the forest plot) -> The SNPs show insignificant (p-values >0.05 and CI crossing 0). The effect sizes go in both positive and negative directions. MR-Egger and IVW summary estimates overlap but also cross 0, thus not significant, indicating no specific outliers.

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the SNPs CI cross 0 and show have insignificant results, indicating no SNP shifts/drives the effect.

Conclusion: LDL levels have no causal effect on AAM.

4.7.1.2 HDL cholesterol (HDL → AAM)

Method β (Effect) SE p-value Interpretation
MR-Egger -0.0102 0.0279 0.7159 Not significant
Weighted median -0.0183 0.0246 0.4559 Not significant
IVW 0.0015 0.0170 0.9287 Not significant
Simple mode 0.0545 0.0472 0.2518 Not significant
Weighted mode -0.0090 0.0212 0.6722 Not significant

As seen on the table above and MR scatter plot, the estimates lie close to 0 with some showing negative and positive effect sizes but the P-values are insignificant, suggesting no causal effect of HDL levels on AAM.

Sensitivity analyses

  • Heterogeneity -> Significant heterogeneity was observed ( MR Egger and IVW Qp-values 0.0315and 0.0352 respectively), indicating inconsistent SNP effects and suggesting possible pleiotropic effects.

  • MR-Egger pleiotropy test -> The MR egger intercept was not significant (p-value 0.5977), indicating no evidence of directional pleiotropy.

  • Steiger directionality test -> p = 0, significant, causal direction is correct, HDL to AAM.

  • Single SNP analysis (and the forest plots) -> The SNPs show insignificant (p-values >0.05 and CI crossing 0). MR-Egger and IVW summary estimates overlap and close to 0, thus not significant, indicating no specific outliers.

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

  • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the SNPs CI cross 0 and show have insignificant results, indicating no SNP shifts/drives the effect.

Conclusion: HDL levels have no causal effect on AAM.

4.7.1.3 Triglycerides (TG → AAM)

Method β (Effect) SE p-value Interpretation
MR-Egger 0.0845 0.0393 0.0360 Significant
Weighted median 0.0414 0.0318 0.1930 Not significant
IVW 0.0169 0.0247 0.4942 Not significant
Simple mode -0.0259 0.0537 0.6322 Not significant
Weighted mode 0.0297 0.0301 0.3291 Not significant

As seen on the table above and MR scatter plot, the estimates lie close to 0 with some most showing positive effect sizes but the p-values are insignificant, suggesting no causal effect of TG levels on AAM.

Sensitivity analyses

  • Heterogeneity -> Significant heterogeneity was observed ( MR Egger and IVW Qp-values 0.0029 and 0.0007 respectively), indicating inconsistent SNP effects and suggesting possible pleiotropic effects.

  • MR-Egger pleiotropy test -> The MR egger intercept was significant (p-value 0.0347), indicating directional pleiotropy.

  • Steiger directionality test -> p = 0, significant, causal direction is correct, TG to AAM.

  • Single SNP analysis (and the forest plots) -> The SNPs show insignificant (p-values >0.05 and CI crossing 0). MR-Egger and IVW summary estimates overlap and close to 0, thus not significant, indicating no specific outliers.

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the SNPs CI cross 0 and show have insignificant results, indicating no SNP shifts/drives the effect.

Conclusion: TG levels have no causal effect on AAM.

4.7.1.4 Total cholesterol (TC → AAM)

Method β (Effect) SE p-value Interpretation
MR-Egger 0.0548 0.0367 0.1390 Not significant
Weighted median 0.0287 0.0260 0.2694 Not significant
IVW 0.0089 0.0184 0.6298 Not significant
Simple mode 0.0148 0.0511 0.7734 Not significant
Weighted mode 0.0241 0.0308 0.4353 Not significant

As seen on the table above and MR scatter plot, the estimates lie close to 0 with some most showing positive effect sizes but the p-values are insignificant, suggesting no causal effect of TC levels on AAM.

Sensitivity analyses

  • Heterogeneity -> Borderline significant heterogeneity was observed ( MR Egger and IVW Qp-values 0.0512 and 0.0413 respectively), indicating some SNOs inconsistency.

  • MR-Egger pleiotropy test -> The MR egger intercept was insignificant (p-value 0.1523), indicating no directional pleiotropy.

  • Steiger directionality test -> p = 0, significant, causal direction is correct, TC to AAM.

  • Single SNP analysis (and the forest plots) -> The SNPs show insignificant (p-values >0.05 and CI crossing 0). MR-Egger and IVW summary estimates overlap and close to 0, thus not significant, indicating no specific outliers.

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the SNPs CI cross 0 and show have insignificant results, indicating no SNP shifts/drives the effect.

Conclusion: TC levels have no causal effect on AAM.

4.7.2 Reverse Multivariable MR (MVMR)

Direction: Lipids + BMI → AAM
Exposures: HDL, LDL, TG and TC , Body Mass Index
Outcome: Age at Menarche
Research Question: Do lipid levels influence age at menarche independent of BMI? and does BMI affect the each lipid level independent of AAM.

######################################################
# Reverse Multivariable MR: Lipids + BMI → AAM 
######################################################

# 1. Exposures = Lipids + BMI
exp_mvmr_lipids_to_aam_bmi <- mv_extract_exposures(
  id_exposure = c(
    lipids,   # lipids
    "ieu-a-2" # BMI
  ),
  clump_r2 = 0.001,
  clump_kb = 10000,
  pop = "EUR"
)
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping 1, 330 variants, using EUR population reference
Removing 144 of 330 variants due to LD with other variants or absence from LD reference panel
Extracting data for 186 SNP(s) from 5 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 16
Querying variant chunk 2 of 16
Querying variant chunk 3 of 16
Querying variant chunk 4 of 16
Querying variant chunk 5 of 16
Querying variant chunk 6 of 16
Querying variant chunk 7 of 16
Querying variant chunk 8 of 16
Querying variant chunk 9 of 16
Querying variant chunk 10 of 16
Querying variant chunk 11 of 16
Querying variant chunk 12 of 16
Querying variant chunk 13 of 16
Querying variant chunk 14 of 16
Querying variant chunk 15 of 16
Querying variant chunk 16 of 16
Finding proxies for 1 SNPs in outcome ebi-a-GCST002222
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Finding proxies for 1 SNPs in outcome ebi-a-GCST002223
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Finding proxies for 2 SNPs in outcome ebi-a-GCST002216
Extracting data for 2 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Finding proxies for 1 SNPs in outcome ebi-a-GCST002221
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Finding proxies for 2 SNPs in outcome ieu-a-2
Extracting data for 2 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222) and Triglycerides || id:ebi-a-GCST002216 (ebi-a-GCST002216)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs14810, rs17001654, rs3758348, rs378479, rs7534572, rs9491696, rs9914578
Harmonising LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222) and Cholesterol, total || id:ebi-a-GCST002221 (ebi-a-GCST002221)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs14810, rs17001654, rs3758348, rs378479, rs7534572, rs9491696, rs9914578
Harmonising LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222) and HDL cholesterol || id:ebi-a-GCST002223 (ebi-a-GCST002223)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs14810, rs17001654, rs3758348, rs378479, rs7534572, rs9491696, rs9914578
Harmonising LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222) and Body mass index || id:ieu-a-2 (ieu-a-2)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs14810, rs17001654, rs3758348, rs378479, rs9491696, rs9914578
# 2. Outcome = AAM
out_mvmr_lipids_to_aam_bmi <- extract_outcome_data(
  snps     = exp_mvmr_lipids_to_aam_bmi$SNP,
  outcomes = "ieu-a-1095"
)
Extracting data for 176 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 3
Querying variant chunk 2 of 3
Querying variant chunk 3 of 3
Finding proxies for 5 SNPs in outcome ieu-a-1095
Extracting data for 5 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
# 3. Harmonise  
mvmr_dat_lipids_to_aam_bmi <- mv_harmonise_data(
  exposure_dat = exp_mvmr_lipids_to_aam_bmi,
  outcome_dat  = out_mvmr_lipids_to_aam_bmi
)
Harmonising LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222) and Age at menarche || id:ieu-a-1095 (ieu-a-1095)
# 4. Run multivariable MR
res_mvmr_lipids_to_aam_bmi <- mv_multiple(mvmr_dat_lipids_to_aam_bmi)
res_mvmr_lipids_to_aam_bmi$result
       id.exposure                                  exposure id.outcome
1 ebi-a-GCST002216      Triglycerides || id:ebi-a-GCST002216 ieu-a-1095
2 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221 ieu-a-1095
3 ebi-a-GCST002222    LDL cholesterol || id:ebi-a-GCST002222 ieu-a-1095
4 ebi-a-GCST002223    HDL cholesterol || id:ebi-a-GCST002223 ieu-a-1095
5          ieu-a-2             Body mass index || id:ieu-a-2 ieu-a-1095
                           outcome nsnp           b         se         pval
1 Age at menarche || id:ieu-a-1095   35  0.01878774 0.10761983 8.614135e-01
2 Age at menarche || id:ieu-a-1095   67 -0.05392406 0.29254452 8.537564e-01
3 Age at menarche || id:ieu-a-1095   53  0.02567207 0.25491217 9.197811e-01
4 Age at menarche || id:ieu-a-1095   69  0.01705047 0.12865837 8.945690e-01
5 Age at menarche || id:ieu-a-1095   51 -0.54435966 0.04772129 3.855368e-30
#Plot reverse MVMR

ggplot(res_mvmr_lipids_to_aam_bmi$result, aes(x = exposure, y = b)) +
  geom_point(size = 3) +
  geom_errorbar(
    aes(ymin = b - 1.96 * se, ymax = b + 1.96 * se),
    width = 0.15
  ) +
  theme_bw() +
  theme(
    axis.text.x = element_text(angle = 30, hjust = 1, size = 11)
  ) +
  labs(
    title = "Reverse MVMR: Effects of Lipids and BMI on Age at Menarche",
    x = "Exposure",
    y = "Effect on AAM"
  )

4.7.2.1 Results for Reverse MVMR (Lipids + BMI → AAM)

Exposure SNPs β SE p-value
Triglycerides 35 0.0188 0.1076 0.8614 Not significant
Total Cholesterol 67 -0.0539 0.2925 0.8538 Not significant
LDL Cholesterol 53 0.0257 0.2549 0.9198 Not significant
HDL Cholesterol 69 0.0171 0.1287 0.8946 Not significant
Body Mass Index (BMI) 51 -0.5444 0.0477 3.86 × 10⁻³⁰ Highly significant

Only BMI showed significant causal effects on AAM, suggesting higher BMI leads to earlier age at menarche. Higher BMI, early puberty.

5 Age at Natural Menopause

5.1 Age at natural menopause and Type 2 Diabetes

5.2 Forward MR

Direction: ANM → T2D Exposure: ANM Outcome: Type 2 Diabetes Research Question: Does ANM causally influence T2D risk?

###################################################
# Forward MR: ANM -> T2D
##################################################

# Obtain the ANM exposure dataset from OpenGWAS
exposure_anm <- extract_instruments("ieu-a-1004")  #age at natural menopause

# Clumping
clumped_exp_anm <- clump_data(
  exposure_anm,
  clump_r2 = 0.001,
  clump_kb = 10000,
  pop = "EUR"
)
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping ieu-a-1004, 43 variants, using EUR population reference
Removing 2 of 43 variants due to LD with other variants or absence from LD reference panel
### F statistic
clumped_exp_anm$F_statistic <- (clumped_exp_anm$beta.exposure^2) /
                               (clumped_exp_anm$se.exposure^2)
summary(clumped_exp_anm$F_statistic)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  28.44   42.25   56.25   80.95   81.00  484.00 
# Outcome = T2D
outcome_anm_T2D <- extract_outcome_data(
  snps     = clumped_exp_anm$SNP,
  outcomes = "ebi-a-GCST005047"   # Morris T2D
)
Extracting data for 41 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
# Harmonise
harmonized_data_anm_T2D <- harmonise_data(
  clumped_exp_anm,
  outcome_anm_T2D,
  action = 1
)
Harmonising Age at menopause || id:ieu-a-1004 (ieu-a-1004) and Type 2 diabetes || id:ebi-a-GCST005047 (ebi-a-GCST005047)
head(harmonized_data_anm_T2D)
         SNP effect_allele.exposure other_allele.exposure effect_allele.outcome
1  rs1046089                      A                     G                     A
2 rs10813912                      G                     A                     G
3 rs10905065                      A                     G                     A
4 rs10937153                      A                     G                     A
5 rs11031002                      A                     T                     A
6 rs11647580                      C                     G                     C
  other_allele.outcome beta.exposure beta.outcome eaf.exposure eaf.outcome
1                    G         -0.22   0.01980260         0.32          NA
2                    A          0.12   0.00995033         0.53          NA
3                    G         -0.11  -0.00995033         0.61          NA
4                    G          0.14  -0.02955880         0.23          NA
5                    T          0.22  -0.02955880         0.09          NA
6                    G         -0.16  -0.01980260         0.50          NA
  remove palindromic ambiguous       id.outcome chr       pos se.outcome
1  FALSE       FALSE     FALSE ebi-a-GCST005047   6  31602967  0.0147896
2  FALSE       FALSE     FALSE ebi-a-GCST005047   9  32975210  0.0149339
3  FALSE       FALSE     FALSE ebi-a-GCST005047  10   5769827  0.0153842
4  FALSE       FALSE     FALSE ebi-a-GCST005047   3 183562925  0.0100043
5  FALSE        TRUE      TRUE ebi-a-GCST005047  11  30215261  0.0253885
6  FALSE        TRUE      TRUE ebi-a-GCST005047  16  11957609  0.0152311
  samplesize.outcome pval.outcome                                outcome
1              12171    0.0990011 Type 2 diabetes || id:ebi-a-GCST005047
2              12171    0.3200000 Type 2 diabetes || id:ebi-a-GCST005047
3              12171    0.6900000 Type 2 diabetes || id:ebi-a-GCST005047
4              12171    0.0179999 Type 2 diabetes || id:ebi-a-GCST005047
5              12171    0.2200000 Type 2 diabetes || id:ebi-a-GCST005047
6              12171    0.2000000 Type 2 diabetes || id:ebi-a-GCST005047
  originalname.outcome      outcome.deprecated mr_keep.outcome
1      Type 2 diabetes Type 2 diabetes ||  ||             TRUE
2      Type 2 diabetes Type 2 diabetes ||  ||             TRUE
3      Type 2 diabetes Type 2 diabetes ||  ||             TRUE
4      Type 2 diabetes Type 2 diabetes ||  ||             TRUE
5      Type 2 diabetes Type 2 diabetes ||  ||             TRUE
6      Type 2 diabetes Type 2 diabetes ||  ||             TRUE
  data_source.outcome id.exposure chr.exposure pos.exposure se.exposure
1                 igd  ieu-a-1004            6     31602967        0.02
2                 igd  ieu-a-1004            9     32975210        0.02
3                 igd  ieu-a-1004           10      5769827        0.02
4                 igd  ieu-a-1004            3    183562925        0.02
5                 igd  ieu-a-1004           11     30215261        0.03
6                 igd  ieu-a-1004           16     11957609        0.02
  pval.exposure samplesize.exposure                          exposure
1   3.69999e-21               69360 Age at menopause || id:ieu-a-1004
2   2.19999e-08               69360 Age at menopause || id:ieu-a-1004
3   3.89996e-08               69360 Age at menopause || id:ieu-a-1004
4   8.30004e-09               69360 Age at menopause || id:ieu-a-1004
5   1.90020e-13               69360 Age at menopause || id:ieu-a-1004
6   4.49987e-14               69360 Age at menopause || id:ieu-a-1004
  mr_keep.exposure pval_origin.exposure data_source.exposure F_statistic action
1             TRUE             reported                  igd   121.00000      1
2             TRUE             reported                  igd    36.00000      1
3             TRUE             reported                  igd    30.25000      1
4             TRUE             reported                  igd    49.00000      1
5             TRUE             reported                  igd    53.77778      1
6             TRUE             reported                  igd    64.00000      1
  SNP_index mr_keep
1         1    TRUE
2         1    TRUE
3         1    TRUE
4         1    TRUE
5         1    TRUE
6         1    TRUE
# Run MR
res_anm_T2D <- mr(harmonized_data_anm_T2D)
Analysing 'ieu-a-1004' on 'ebi-a-GCST005047'
head(res_anm_T2D)
  id.exposure       id.outcome                                outcome
1  ieu-a-1004 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
2  ieu-a-1004 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
3  ieu-a-1004 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
4  ieu-a-1004 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
5  ieu-a-1004 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
                           exposure                    method nsnp           b
1 Age at menopause || id:ieu-a-1004                  MR Egger   41 -0.08271675
2 Age at menopause || id:ieu-a-1004           Weighted median   41 -0.04710971
3 Age at menopause || id:ieu-a-1004 Inverse variance weighted   41 -0.01828337
4 Age at menopause || id:ieu-a-1004               Simple mode   41 -0.06241617
5 Age at menopause || id:ieu-a-1004             Weighted mode   41 -0.06241617
          se        pval
1 0.04782130 0.091591318
2 0.02022908 0.019869067
3 0.01879502 0.330664023
4 0.04075453 0.133513588
5 0.02189731 0.006871403
# Scatter plot
p1_res_anm_T2D <- mr_scatter_plot(res_anm_T2D, harmonized_data_anm_T2D)
p1_res_anm_T2D[[1]]

# Heterogeneity
mr_heterogeneity(harmonized_data_anm_T2D)
  id.exposure       id.outcome                                outcome
1  ieu-a-1004 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
2  ieu-a-1004 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
                           exposure                    method        Q Q_df
1 Age at menopause || id:ieu-a-1004                  MR Egger 85.13433   39
2 Age at menopause || id:ieu-a-1004 Inverse variance weighted 89.79774   40
        Q_pval
1 2.779106e-05
2 1.086847e-05
# Pleiotropy
mr_pleiotropy_test(harmonized_data_anm_T2D)
  id.exposure       id.outcome                                outcome
1  ieu-a-1004 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047
                           exposure egger_intercept          se      pval
1 Age at menopause || id:ieu-a-1004      0.01288234 0.008813793 0.1518591
# Single SNP MR
res_single_anm_T2D <- mr_singlesnp(harmonized_data_anm_T2D)
head(res_single_anm_T2D)
                           exposure                                outcome
1 Age at menopause || id:ieu-a-1004 Type 2 diabetes || id:ebi-a-GCST005047
2 Age at menopause || id:ieu-a-1004 Type 2 diabetes || id:ebi-a-GCST005047
3 Age at menopause || id:ieu-a-1004 Type 2 diabetes || id:ebi-a-GCST005047
4 Age at menopause || id:ieu-a-1004 Type 2 diabetes || id:ebi-a-GCST005047
5 Age at menopause || id:ieu-a-1004 Type 2 diabetes || id:ebi-a-GCST005047
6 Age at menopause || id:ieu-a-1004 Type 2 diabetes || id:ebi-a-GCST005047
  id.exposure       id.outcome samplesize        SNP           b         se
1  ieu-a-1004 ebi-a-GCST005047      12171  rs1046089 -0.09001182 0.06722545
2  ieu-a-1004 ebi-a-GCST005047      12171 rs10813912  0.08291942 0.12444917
3  ieu-a-1004 ebi-a-GCST005047      12171 rs10905065  0.09045755 0.13985636
4  ieu-a-1004 ebi-a-GCST005047      12171 rs10937153 -0.21113429 0.07145929
5  ieu-a-1004 ebi-a-GCST005047      12171 rs11031002 -0.13435818 0.11540227
6  ieu-a-1004 ebi-a-GCST005047      12171 rs11647580  0.12376625 0.09519437
           p
1 0.18058552
2 0.50522482
3 0.51776857
4 0.00313065
5 0.24431890
6 0.19355214
# Forest plot
p2_res_single_anm_T2D <- mr_forest_plot(res_single_anm_T2D)
p2_res_single_anm_T2D[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

# Funnel plot
p4_res_single_anm_T2D <- mr_funnel_plot(res_single_anm_T2D)
p4_res_single_anm_T2D[[1]]

# Leave-one-out
res_loo_anm_T2D <- mr_leaveoneout(harmonized_data_anm_T2D)
head(res_loo_anm_T2D)
                           exposure                                outcome
1 Age at menopause || id:ieu-a-1004 Type 2 diabetes || id:ebi-a-GCST005047
2 Age at menopause || id:ieu-a-1004 Type 2 diabetes || id:ebi-a-GCST005047
3 Age at menopause || id:ieu-a-1004 Type 2 diabetes || id:ebi-a-GCST005047
4 Age at menopause || id:ieu-a-1004 Type 2 diabetes || id:ebi-a-GCST005047
5 Age at menopause || id:ieu-a-1004 Type 2 diabetes || id:ebi-a-GCST005047
6 Age at menopause || id:ieu-a-1004 Type 2 diabetes || id:ebi-a-GCST005047
  id.exposure       id.outcome samplesize        SNP           b         se
1  ieu-a-1004 ebi-a-GCST005047      12171  rs1046089 -0.01569578 0.01924708
2  ieu-a-1004 ebi-a-GCST005047      12171 rs10813912 -0.01932215 0.01906060
3  ieu-a-1004 ebi-a-GCST005047      12171 rs10905065 -0.01916527 0.01904653
4  ieu-a-1004 ebi-a-GCST005047      12171 rs10937153 -0.01215171 0.01850799
5  ieu-a-1004 ebi-a-GCST005047      12171 rs11031002 -0.01689549 0.01903845
6  ieu-a-1004 ebi-a-GCST005047      12171 rs11647580 -0.02079355 0.01895808
          p
1 0.4147925
2 0.3107153
3 0.3143029
4 0.5114603
5 0.3748418
6 0.2727211
p_loo_anm_T2D <- mr_leaveoneout_plot(res_loo_anm_T2D)
p_loo_anm_T2D[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

# Steiger directionality
out_anm_T2D <- directionality_test(harmonized_data_anm_T2D)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
head(out_anm_T2D)
  id.exposure       id.outcome                          exposure
1  ieu-a-1004 ebi-a-GCST005047 Age at menopause || id:ieu-a-1004
                                 outcome snp_r2.exposure snp_r2.outcome
1 Type 2 diabetes || id:ebi-a-GCST005047      0.04007178    0.007322349
  correct_causal_direction steiger_pval
1                     TRUE 9.514891e-33

5.2.1 Results for Forward MR (ANM → T2D)

Method β (Effect) SE p-value Interpretation
MR-Egger -0.0827 0.0478 0.0916 Not significant
Weighted Median -0.0471 0.0206 0.0219 Significant
IVW -0.0183 0.0188 0.3307 Not significant
Simple Mode -0.0624 0.0401 0.1256 Not significant
Weighted Mode -0.0624 0.0225 0.0084 Significant

The MR estimates were non significant except for Weighted Median and Weighted Mode.

Sensitivity analyses

  • Heterogeneity -> Strong heterogeneity was observed, indicating inconsistent SNP effects and suggesting possible pleiotropic effects (MR-Egger p-value 2.779106e-05 and IVW Qpvalue 1.086847e-05).

  • MR-Egger pleiotropy test -> The Egger intercept was not significant too (p-value 0.1518), indicating no strong evidence of directional pleiotropy.

  • Steiger directionality test -> p = 9.514891e-33, confirming the correct causal direction is ANM to T2D, and that reverse causation is unlikely.

  • Single SNP analysis( and the forest plot) -> Almost all the SNPs were non-significant, with some having positive and negative effect but showed no strong outliers dominating the results.

    • Funnel plot: The SNPs show symmetrical distribution.
  • Leave-one-out analysis -> Most p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. Most of the estimates had a confidence interval crossing 0, indicating no SNP shifts/drives the effect.

Conclusion: Suggestive evidence that later age of menopause may be associated with reduced T2D. In the presence of strong heterogeneity as observed, this should be interpreted cautiously.

5.3 Multivariable MR

5.4 Forward Multivariable MR (MVMR)

Direction: ANM + BMI → T2D
Exposures: ANM, Body Mass Index
Outcome: Type 2 Diabetes
Research Question: Does ANM affect T2D independent of BMI? and how does BMI affect T2D independent of ANM?

###################################################
# Multivariable MR: anm + BMI -> T2D
##################################################
# Instruments for anm + BMI
exp_anm_mv <- mv_extract_exposures(
  id_exposure = c("ieu-a-1004", "ieu-a-2"), #anm and bmi
  clump_r2 = 0.001,
  clump_kb = 10000,
  pop = "EUR"
)
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping 1, 121 variants, using EUR population reference
Removing 13 of 121 variants due to LD with other variants or absence from LD reference panel
Extracting data for 108 SNP(s) from 2 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 4
Querying variant chunk 2 of 4
Querying variant chunk 3 of 4
Querying variant chunk 4 of 4
Harmonising Age at menopause || id:ieu-a-1004 (ieu-a-1004) and Body mass index || id:ieu-a-2 (ieu-a-2)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs11647580, rs12599106, rs1558902
# Outcome: T2D
out_anm_T2D <- extract_outcome_data(
  snps     = exp_anm_mv$SNP,
  outcomes = "ebi-a-GCST005047" #t2d
)
Extracting data for 105 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 1 SNPs in outcome ebi-a-GCST005047
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
# Harmonise
mv_anm_dat <- mv_harmonise_data(exp_anm_mv, out_anm_T2D)
Harmonising Age at menopause || id:ieu-a-1004 (ieu-a-1004) and Type 2 diabetes || id:ebi-a-GCST005047 (ebi-a-GCST005047)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs11031002, rs11852419, rs14810, rs1727326, rs9304665, rs9579083
# Multivariable MR
res_mvmr_anm <- mv_multiple(mv_anm_dat)
head(res_mvmr_anm)
$result
  id.exposure                          exposure       id.outcome
1  ieu-a-1004 Age at menopause || id:ieu-a-1004 ebi-a-GCST005047
2     ieu-a-2     Body mass index || id:ieu-a-2 ebi-a-GCST005047
                                 outcome nsnp            b         se
1 Type 2 diabetes || id:ebi-a-GCST005047   32 -0.009090498 0.03196364
2 Type 2 diabetes || id:ebi-a-GCST005047   66  0.599057008 0.16617247
          pval
1 0.7761029629
2 0.0003121151
# Main MVMR plot
ggplot(res_mvmr_anm$result, aes(x = exposure, y = b)) +
  geom_point(size = 3) +
  geom_errorbar(
    aes(ymin = b - 1.96 * se, ymax = b + 1.96 * se),
    width = 0.1
  ) +
  theme_bw() +
  labs(
    title = "Multivariable MR: Direct effects on Type 2 Diabetes",
    x = "Exposure",
    y = "Effect on T2D"
  )

5.4.0.1 Results for Forward Multivariable MR (ANM + BMI → T2D)

Exposure β SE p-value Interpretation
Age at menopause (ANM) -0.0091 0.0320 0.7761 Not significant
Body mass index (BMI) 0.5991 0.1662 0.00031 Significant

After adjusting for BMI, age at natural menopause has no direct causal effect on type 2 diabetes. However, Higher BMI has a strong direct causal effect increasing the risk of T2D.

5.5 Reverse MR

Direction: T2D → ANM
Exposure: Type 2 Diabetes
Outcome: ANM
Research Question: Does T2D causally influence ANM?

###################################################
#Reverse MR: T2D -> ANM
##################################################

# 1. Instruments for T2D (exposure)
exp_T2D <- extract_instruments("ebi-a-GCST005047") #t2d

exp_T2D_clumped <- clump_data(
  exp_T2D,
  clump_r2 = 0.001,
  clump_kb = 10000,
  pop = "EUR"
)
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping ebi-a-GCST005047, 34 variants, using EUR population reference
exp_T2D_clumped$F_statistic <- (exp_T2D_clumped$beta.exposure^2) / (exp_T2D_clumped$se.exposure^2)
summary(exp_T2D_clumped$F_statistic)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  23.00   41.10   49.40   81.31   71.09  546.36 
# 2. Outcome = ANM
out_anm <- extract_outcome_data(
  snps     = exp_T2D_clumped$SNP,
  outcomes = "ieu-a-1004"   # Age at Natural Menopause
)
Extracting data for 34 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
# 3. Harmonise
harmonise_data_T2D_anm <- harmonise_data(
  exp_T2D_clumped,
  out_anm,
  action = 1
)
Harmonising Type 2 diabetes || id:ebi-a-GCST005047 (ebi-a-GCST005047) and Age at menopause || id:ieu-a-1004 (ieu-a-1004)
# 4. Reverse MR
res_T2D_anm <- mr(harmonise_data_T2D_anm)
Analysing 'ebi-a-GCST005047' on 'ieu-a-1004'
head(res_T2D_anm)
       id.exposure id.outcome                           outcome
1 ebi-a-GCST005047 ieu-a-1004 Age at menopause || id:ieu-a-1004
2 ebi-a-GCST005047 ieu-a-1004 Age at menopause || id:ieu-a-1004
3 ebi-a-GCST005047 ieu-a-1004 Age at menopause || id:ieu-a-1004
4 ebi-a-GCST005047 ieu-a-1004 Age at menopause || id:ieu-a-1004
5 ebi-a-GCST005047 ieu-a-1004 Age at menopause || id:ieu-a-1004
                                exposure                    method nsnp
1 Type 2 diabetes || id:ebi-a-GCST005047                  MR Egger   34
2 Type 2 diabetes || id:ebi-a-GCST005047           Weighted median   34
3 Type 2 diabetes || id:ebi-a-GCST005047 Inverse variance weighted   34
4 Type 2 diabetes || id:ebi-a-GCST005047               Simple mode   34
5 Type 2 diabetes || id:ebi-a-GCST005047             Weighted mode   34
           b         se      pval
1 0.09884349 0.09158075 0.2885204
2 0.04702547 0.05315651 0.3763397
3 0.05121845 0.03473182 0.1402976
4 0.05859010 0.08570359 0.4989772
5 0.04902114 0.05992547 0.4192049
# Scatter plot
p1_res_T2D_anm <- mr_scatter_plot(res_T2D_anm, harmonise_data_T2D_anm)
p1_res_T2D_anm[[1]]

# Heterogeneity
mr_heterogeneity(harmonise_data_T2D_anm)
       id.exposure id.outcome                           outcome
1 ebi-a-GCST005047 ieu-a-1004 Age at menopause || id:ieu-a-1004
2 ebi-a-GCST005047 ieu-a-1004 Age at menopause || id:ieu-a-1004
                                exposure                    method        Q
1 Type 2 diabetes || id:ebi-a-GCST005047                  MR Egger 30.17680
2 Type 2 diabetes || id:ebi-a-GCST005047 Inverse variance weighted 30.49266
  Q_df    Q_pval
1   32 0.5590353
2   33 0.5925498
# Pleiotropy
mr_pleiotropy_test(harmonise_data_T2D_anm)
       id.exposure id.outcome                           outcome
1 ebi-a-GCST005047 ieu-a-1004 Age at menopause || id:ieu-a-1004
                                exposure egger_intercept         se      pval
1 Type 2 diabetes || id:ebi-a-GCST005047    -0.005675704 0.01009878 0.5780189
# Single-SNP MR
res_single_T2D_anm <- mr_singlesnp(harmonise_data_T2D_anm)
head(res_single_T2D_anm)
                                exposure                           outcome
1 Type 2 diabetes || id:ebi-a-GCST005047 Age at menopause || id:ieu-a-1004
2 Type 2 diabetes || id:ebi-a-GCST005047 Age at menopause || id:ieu-a-1004
3 Type 2 diabetes || id:ebi-a-GCST005047 Age at menopause || id:ieu-a-1004
4 Type 2 diabetes || id:ebi-a-GCST005047 Age at menopause || id:ieu-a-1004
5 Type 2 diabetes || id:ebi-a-GCST005047 Age at menopause || id:ieu-a-1004
6 Type 2 diabetes || id:ebi-a-GCST005047 Age at menopause || id:ieu-a-1004
       id.exposure id.outcome samplesize        SNP          b        se
1 ebi-a-GCST005047 ieu-a-1004      69360 rs10099941 -0.2956017 0.2956017
2 ebi-a-GCST005047 ieu-a-1004      69360 rs10258074  0.0000000 0.2320786
3 ebi-a-GCST005047 ieu-a-1004      69360 rs10830961  0.2320786 0.2320786
4 ebi-a-GCST005047 ieu-a-1004      69360 rs10842993  0.3481179 0.3481179
5 ebi-a-GCST005047 ieu-a-1004      69360 rs11257655  0.2098411 0.3147617
6 ebi-a-GCST005047 ieu-a-1004      69360 rs11708067 -0.5246028 0.2098411
           p
1 0.31731051
2 1.00000000
3 0.31731051
4 0.31731051
5 0.50498508
6 0.01241933
# Forest plot
p2_res_single_T2D_anm <- mr_forest_plot(res_single_T2D_anm)
p2_res_single_T2D_anm[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

# Funnel plot
p4_res_single_T2D_anm <- mr_funnel_plot(res_single_T2D_anm)
p4_res_single_T2D_anm[[1]]

# Leave-one-out
res_loo_T2D_anm <- mr_leaveoneout(harmonise_data_T2D_anm)
head(res_loo_T2D_anm)
                                exposure                           outcome
1 Type 2 diabetes || id:ebi-a-GCST005047 Age at menopause || id:ieu-a-1004
2 Type 2 diabetes || id:ebi-a-GCST005047 Age at menopause || id:ieu-a-1004
3 Type 2 diabetes || id:ebi-a-GCST005047 Age at menopause || id:ieu-a-1004
4 Type 2 diabetes || id:ebi-a-GCST005047 Age at menopause || id:ieu-a-1004
5 Type 2 diabetes || id:ebi-a-GCST005047 Age at menopause || id:ieu-a-1004
6 Type 2 diabetes || id:ebi-a-GCST005047 Age at menopause || id:ieu-a-1004
       id.exposure id.outcome samplesize        SNP          b         se
1 ebi-a-GCST005047 ieu-a-1004      69360 rs10099941 0.05607337 0.03497407
2 ebi-a-GCST005047 ieu-a-1004      69360 rs10258074 0.05239185 0.03512742
3 ebi-a-GCST005047 ieu-a-1004      69360 rs10830961 0.04707497 0.03512742
4 ebi-a-GCST005047 ieu-a-1004      69360 rs10842993 0.04823336 0.03490598
5 ebi-a-GCST005047 ieu-a-1004      69360 rs11257655 0.04926331 0.03494521
6 ebi-a-GCST005047 ieu-a-1004      69360 rs11708067 0.06743749 0.03521757
           p
1 0.10887193
2 0.13583543
3 0.18020622
4 0.16703070
5 0.15861945
6 0.05550754
p_loo_T2D_anm <- mr_leaveoneout_plot(res_loo_T2D_anm)
p_loo_T2D_anm[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

# Steiger directionality
out_T2D_anm <- directionality_test(harmonise_data_T2D_anm)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
head(out_T2D_anm)
       id.exposure id.outcome                               exposure
1 ebi-a-GCST005047 ieu-a-1004 Type 2 diabetes || id:ebi-a-GCST005047
                            outcome snp_r2.exposure snp_r2.outcome
1 Age at menopause || id:ieu-a-1004       0.1541034     0.00037895
  correct_causal_direction steiger_pval
1                     TRUE            0

5.5.0.1 Results for Reverse MR (T2D → ANM)

Method β (Effect) SE p-value Interpretation
MR-Egger 0.0988 0.0916 0.2885 Not significant
Weighted Median 0.0470 0.0557 0.3988 Not significant
IVW 0.0512 0.0347 0.1403 Not significant
Simple Mode 0.0586 0.0915 0.5262 Not significant
Weighted Mode 0.0490 0.0621 0.4354 Not significant

Based on the effects on the table and their distribution on the MR scatter plot, T2D could delay menopause, but since all of the estimates are not significant, therefore no causal effect of T2D on ANM

Sensitivity analyses

  • Heterogeneity -> Heterogeneity was not observed (MR Egger and IVW Qp-values 0.5590 and 0.5925 respectively), indicating consistent SNP effects and suggesting no possible pleiotropic effects.

  • MR-Egger pleiotropy test -> The egger intercept was not significant (p-value 0.5780), indicating no directional pleiotropy.

  • Steiger directionality test -> p = 0 which is significant, causal direction is correct T2D to ANM.

  • Single SNP analysis (and the forest plots) -> Most of the SNPs were not significant (p-values >0.05 and CI crossing 0). The effect sizes go in both positive and negative directions and with no consistent patterns. The MR-Egger and IVW estimate, were overlapping and crossing 0, thus not significant, indicating no single SNP showed significant drivers.

    • Funnel plot: The SNPs show symmetrical distribution.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the estimates were more than 0 but the confidence intervals were crossing 0, indicating no SNP shifts/drives the effect.

Conclusion: This MR analysis provides no evidence that the T2D has a direct causal effect on age at natural menopause.

5.6 Reverse Multivariable MR (MVMR)

Direction: T2D + BMI → ANM
Exposures: Type 2 Diabetes, Body Mass Index
Outcome: ANM
Research Question: Does T2D influence ANM independent of BMI? and does BMI causally influence T2D independent of ANM.

###################################################
# Reverse MVMR: T2D + BMI -> ANM
###################################################

# 1. Exposures = T2D + BMI
exp_mv_rev_anm <- mv_extract_exposures(
  id_exposure = c(
    "ebi-a-GCST005047",   # T2D liability
    "ieu-a-2"            # BMI
  ),
  clump_r2 = 0.001,
  clump_kb = 10000,
  pop = "EUR"
)
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping 1, 112 variants, using EUR population reference
Removing 11 of 112 variants due to LD with other variants or absence from LD reference panel
Extracting data for 101 SNP(s) from 2 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 4
Querying variant chunk 2 of 4
Querying variant chunk 3 of 4
Querying variant chunk 4 of 4
Finding proxies for 1 SNPs in outcome ebi-a-GCST005047
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Type 2 diabetes || id:ebi-a-GCST005047 (ebi-a-GCST005047) and Body mass index || id:ieu-a-2 (ieu-a-2)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs10258074, rs14810, rs1558902, rs17001654, rs4237150, rs6494307, rs9304665, rs9579083, rs9914578
# 2. Outcome = ANM
out_anm_rev <- extract_outcome_data(
  snps     = exp_mv_rev_anm$SNP,
  outcomes = "ieu-a-1004"   # Age at Natural Menopause
)
Extracting data for 91 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
# 3. Harmonise 
mvdat_rev_T2D_anm <- mv_harmonise_data(
  exp_mv_rev_anm,
  out_anm_rev
)
Harmonising Type 2 diabetes || id:ebi-a-GCST005047 (ebi-a-GCST005047) and Age at menopause || id:ieu-a-1004 (ieu-a-1004)
# 4. Reverse multivariable MR
res_mvmr_rev_T2D_anm <- mv_multiple(mvdat_rev_T2D_anm)
res_mvmr_rev_T2D_anm$result
       id.exposure                               exposure id.outcome
1 ebi-a-GCST005047 Type 2 diabetes || id:ebi-a-GCST005047 ieu-a-1004
2          ieu-a-2          Body mass index || id:ieu-a-2 ieu-a-1004
                            outcome nsnp           b         se      pval
1 Age at menopause || id:ieu-a-1004   26  0.06515825 0.04620489 0.1584799
2 Age at menopause || id:ieu-a-1004   67 -0.20322877 0.13167932 0.1227431
# 5. Plot reverse MVMR
ggplot(res_mvmr_rev_T2D_anm$result, aes(x = exposure, y = b)) +
  geom_point(size = 3) +
  geom_errorbar(
    aes(ymin = b - 1.96 * se, ymax = b + 1.96 * se),
    width = 0.1
  ) +
  theme_bw() +
  labs(
    title = "Reverse MVMR: Effects of T2D and BMI on Age at Natural Menopause",
    x = "Exposure",
    y = "Effect on ANM"
  )

Exposure β SE p-value
T2D 0.0652 0.0462 0.1585 Not significant
Body Mass Index -0.2032 0.1317 0.1227 Not significant

BMI and T2D does not influence age of natural menopause.

5.7 Age at Menopause (ANM) and Lipid levels

5.8 Forward MR

Direction: ANM → LDL, ANM → HDL, ANM → TG, ANM →TC
Exposure: ANM
Outcome: LDL, HDL, TG, TC
Research Question: Does ANM causally influence each lipid levels?

###################################################
# Forward MR: ANM -> Lipids
###################################################

### We already have clumped_exp_anm from the previous MR (T2D)

lipids <- c(
  "ebi-a-GCST002222",  # LDL
  "ebi-a-GCST002223",  # HDL
  "ebi-a-GCST002216",  # Triglycerides
  "ebi-a-GCST002221"   # Total Cholesterol
)

### Loop ANM -> Lipids MR
mr_results_anm_to_lipids <- list()
harmonised_results_anm <- list()

for(lipid in lipids){

  outcome_lipids <- extract_outcome_data(
    snps     = clumped_exp_anm$SNP,
    outcomes = lipid
  )

  harmonise_data_anm_to_lipids <- harmonise_data(
    exposure_dat = clumped_exp_anm,
    outcome_dat  = outcome_lipids
  )

  harmonised_results_anm[[lipid]] <- harmonise_data_anm_to_lipids

  if(nrow(harmonise_data_anm_to_lipids) > 3){
    res_anm_to_lipids <- mr(harmonise_data_anm_to_lipids)
  } else {
    res_anm_to_lipids <- NA
  }

  mr_results_anm_to_lipids[[lipid]] <- res_anm_to_lipids
}
Extracting data for 41 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Age at menopause || id:ieu-a-1004 (ieu-a-1004) and LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs11031002, rs11647580, rs11852419, rs12599106, rs1727326
Analysing 'ieu-a-1004' on 'ebi-a-GCST002222'
Extracting data for 41 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Age at menopause || id:ieu-a-1004 (ieu-a-1004) and HDL cholesterol || id:ebi-a-GCST002223 (ebi-a-GCST002223)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs11031002, rs11647580, rs11852419, rs12599106, rs1727326
Analysing 'ieu-a-1004' on 'ebi-a-GCST002223'
Extracting data for 41 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Age at menopause || id:ieu-a-1004 (ieu-a-1004) and Triglycerides || id:ebi-a-GCST002216 (ebi-a-GCST002216)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs11031002, rs11647580, rs11852419, rs12599106, rs1727326
Analysing 'ieu-a-1004' on 'ebi-a-GCST002216'
Extracting data for 41 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Age at menopause || id:ieu-a-1004 (ieu-a-1004) and Cholesterol, total || id:ebi-a-GCST002221 (ebi-a-GCST002221)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs11031002, rs11647580, rs11852419, rs12599106, rs1727326
Analysing 'ieu-a-1004' on 'ebi-a-GCST002221'
mr_results_anm_to_lipids
$`ebi-a-GCST002222`
  id.exposure       id.outcome                                outcome
1  ieu-a-1004 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
2  ieu-a-1004 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
3  ieu-a-1004 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
4  ieu-a-1004 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
5  ieu-a-1004 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
                           exposure                    method nsnp
1 Age at menopause || id:ieu-a-1004                  MR Egger   36
2 Age at menopause || id:ieu-a-1004           Weighted median   36
3 Age at menopause || id:ieu-a-1004 Inverse variance weighted   36
4 Age at menopause || id:ieu-a-1004               Simple mode   36
5 Age at menopause || id:ieu-a-1004             Weighted mode   36
              b          se      pval
1  0.0005930935 0.009186307 0.9489002
2  0.0047262453 0.006560958 0.4713040
3 -0.0035025422 0.004381691 0.4240825
4  0.0087759282 0.012992814 0.5038316
5  0.0066766082 0.007701639 0.3918973

$`ebi-a-GCST002223`
  id.exposure       id.outcome                                outcome
1  ieu-a-1004 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
2  ieu-a-1004 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
3  ieu-a-1004 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
4  ieu-a-1004 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
5  ieu-a-1004 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
                           exposure                    method nsnp            b
1 Age at menopause || id:ieu-a-1004                  MR Egger   36 -0.016404365
2 Age at menopause || id:ieu-a-1004           Weighted median   36 -0.011411312
3 Age at menopause || id:ieu-a-1004 Inverse variance weighted   36 -0.004265134
4 Age at menopause || id:ieu-a-1004               Simple mode   36 -0.005889544
5 Age at menopause || id:ieu-a-1004             Weighted mode   36 -0.010891076
           se       pval
1 0.010542366 0.12895854
2 0.005950284 0.05513943
3 0.005136043 0.40629461
4 0.012235463 0.63326346
5 0.005725094 0.06538083

$`ebi-a-GCST002216`
  id.exposure       id.outcome                              outcome
1  ieu-a-1004 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
2  ieu-a-1004 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
3  ieu-a-1004 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
4  ieu-a-1004 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
5  ieu-a-1004 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
                           exposure                    method nsnp            b
1 Age at menopause || id:ieu-a-1004                  MR Egger   36 -0.007204778
2 Age at menopause || id:ieu-a-1004           Weighted median   36  0.003824472
3 Age at menopause || id:ieu-a-1004 Inverse variance weighted   36  0.015316942
4 Age at menopause || id:ieu-a-1004               Simple mode   36  0.008253977
5 Age at menopause || id:ieu-a-1004             Weighted mode   36  0.004675219
           se      pval
1 0.027317039 0.7935672
2 0.005389632 0.4779535
3 0.013164104 0.2446111
4 0.009271138 0.3793907
5 0.005568200 0.4068155

$`ebi-a-GCST002221`
  id.exposure       id.outcome                                   outcome
1  ieu-a-1004 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
2  ieu-a-1004 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
3  ieu-a-1004 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
4  ieu-a-1004 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
5  ieu-a-1004 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
                           exposure                    method nsnp            b
1 Age at menopause || id:ieu-a-1004                  MR Egger   36 -0.013094744
2 Age at menopause || id:ieu-a-1004           Weighted median   36 -0.005006700
3 Age at menopause || id:ieu-a-1004 Inverse variance weighted   36 -0.002839820
4 Age at menopause || id:ieu-a-1004               Simple mode   36 -0.001538733
5 Age at menopause || id:ieu-a-1004             Weighted mode   36 -0.007178484
           se      pval
1 0.011922430 0.2797784
2 0.006271688 0.4246953
3 0.005780478 0.6232301
4 0.012874398 0.9055477
5 0.006978055 0.3106671
#############################
### Plot results for ANM_to_LDL
data_anm_to_ldl <- harmonised_results_anm[["ebi-a-GCST002222"]]
res_anm_to_ldl  <- mr_results_anm_to_lipids[["ebi-a-GCST002222"]]

p1_res_anm_to_ldl <- mr_scatter_plot(res_anm_to_ldl, data_anm_to_ldl)
p1_res_anm_to_ldl[[1]]

mr_heterogeneity(data_anm_to_ldl)
  id.exposure       id.outcome                                outcome
1  ieu-a-1004 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
2  ieu-a-1004 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
                           exposure                    method        Q Q_df
1 Age at menopause || id:ieu-a-1004                  MR Egger 37.17082   34
2 Age at menopause || id:ieu-a-1004 Inverse variance weighted 37.45394   35
     Q_pval
1 0.3250851
2 0.3571639
mr_pleiotropy_test(data_anm_to_ldl)
  id.exposure       id.outcome                                outcome
1  ieu-a-1004 ebi-a-GCST002222 LDL cholesterol || id:ebi-a-GCST002222
                           exposure egger_intercept          se      pval
1 Age at menopause || id:ieu-a-1004    -0.001002438 0.001969862 0.6141177
res_single_anm_to_ldl <- mr_singlesnp(data_anm_to_ldl)
head(res_single_anm_to_ldl)
                           exposure                                outcome
1 Age at menopause || id:ieu-a-1004 LDL cholesterol || id:ebi-a-GCST002222
2 Age at menopause || id:ieu-a-1004 LDL cholesterol || id:ebi-a-GCST002222
3 Age at menopause || id:ieu-a-1004 LDL cholesterol || id:ebi-a-GCST002222
4 Age at menopause || id:ieu-a-1004 LDL cholesterol || id:ebi-a-GCST002222
5 Age at menopause || id:ieu-a-1004 LDL cholesterol || id:ebi-a-GCST002222
6 Age at menopause || id:ieu-a-1004 LDL cholesterol || id:ebi-a-GCST002222
  id.exposure       id.outcome samplesize        SNP            b          se
1  ieu-a-1004 ebi-a-GCST002222      94595  rs1046089  0.008636364 0.018181818
2  ieu-a-1004 ebi-a-GCST002222      94595 rs10813912  0.012500000 0.045000000
3  ieu-a-1004 ebi-a-GCST002222      94595 rs10905065 -0.129090909 0.048181818
4  ieu-a-1004 ebi-a-GCST002222      94595 rs10937153 -0.016428571 0.044285714
5  ieu-a-1004 ebi-a-GCST002222      94595 rs11668309 -0.016341463 0.009512195
6  ieu-a-1004 ebi-a-GCST002222      94595 rs11804189  0.053636364 0.049090909
            p
1 0.634786973
2 0.781182951
3 0.007378832
4 0.710661558
5 0.085805970
6 0.274572716
p2_res_single_anm_to_ldl <- mr_forest_plot(res_single_anm_to_ldl)
p2_res_single_anm_to_ldl[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_res_single_anm_to_ldl <- mr_funnel_plot(res_single_anm_to_ldl)
p4_res_single_anm_to_ldl[[1]]

res_loo_anm_to_ldl <- mr_leaveoneout(data_anm_to_ldl)
head(res_loo_anm_to_ldl)
                           exposure                                outcome
1 Age at menopause || id:ieu-a-1004 LDL cholesterol || id:ebi-a-GCST002222
2 Age at menopause || id:ieu-a-1004 LDL cholesterol || id:ebi-a-GCST002222
3 Age at menopause || id:ieu-a-1004 LDL cholesterol || id:ebi-a-GCST002222
4 Age at menopause || id:ieu-a-1004 LDL cholesterol || id:ebi-a-GCST002222
5 Age at menopause || id:ieu-a-1004 LDL cholesterol || id:ebi-a-GCST002222
6 Age at menopause || id:ieu-a-1004 LDL cholesterol || id:ebi-a-GCST002222
  id.exposure       id.outcome samplesize        SNP             b          se
1  ieu-a-1004 ebi-a-GCST002222      94595  rs1046089 -0.0041991573 0.004542588
2  ieu-a-1004 ebi-a-GCST002222      94595 rs10813912 -0.0036455906 0.004457874
3  ieu-a-1004 ebi-a-GCST002222      94595 rs10905065 -0.0025243900 0.004252181
4  ieu-a-1004 ebi-a-GCST002222      94595 rs10937153 -0.0033832031 0.004461006
5  ieu-a-1004 ebi-a-GCST002222      94595 rs11668309 -0.0003271189 0.004812110
6  ieu-a-1004 ebi-a-GCST002222      94595 rs11804189 -0.0039311194 0.004380238
          p
1 0.3552793
2 0.4134789
3 0.5527332
4 0.4482148
5 0.9458029
6 0.3694697
p_loo_anm_to_ldl <- mr_leaveoneout_plot(res_loo_anm_to_ldl)
p_loo_anm_to_ldl[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

out_anm_to_ldl <- directionality_test(data_anm_to_ldl)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_anm_to_ldl
  id.exposure       id.outcome                          exposure
1  ieu-a-1004 ebi-a-GCST002222 Age at menopause || id:ieu-a-1004
                                 outcome snp_r2.exposure snp_r2.outcome
1 LDL cholesterol || id:ebi-a-GCST002222      0.04007178   0.0004438736
  correct_causal_direction  steiger_pval
1                     TRUE 9.850347e-290
#############################
### Plot results for ANM_to_HDL
data_anm_to_hdl <- harmonised_results_anm[["ebi-a-GCST002223"]]
res_anm_to_hdl  <- mr_results_anm_to_lipids[["ebi-a-GCST002223"]]

p1_res_anm_to_hdl <- mr_scatter_plot(res_anm_to_hdl, data_anm_to_hdl)
p1_res_anm_to_hdl[[1]]

mr_heterogeneity(data_anm_to_hdl)
  id.exposure       id.outcome                                outcome
1  ieu-a-1004 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
2  ieu-a-1004 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
                           exposure                    method        Q Q_df
1 Age at menopause || id:ieu-a-1004                  MR Egger 57.39349   34
2 Age at menopause || id:ieu-a-1004 Inverse variance weighted 60.30970   35
       Q_pval
1 0.007305756
2 0.004957874
mr_pleiotropy_test(data_anm_to_hdl)
  id.exposure       id.outcome                                outcome
1  ieu-a-1004 ebi-a-GCST002223 HDL cholesterol || id:ebi-a-GCST002223
                           exposure egger_intercept          se      pval
1 Age at menopause || id:ieu-a-1004      0.00296827 0.002258323 0.1975203
res_single_anm_to_hdl <- mr_singlesnp(data_anm_to_hdl)
head(res_single_anm_to_hdl)
                           exposure                                outcome
1 Age at menopause || id:ieu-a-1004 HDL cholesterol || id:ebi-a-GCST002223
2 Age at menopause || id:ieu-a-1004 HDL cholesterol || id:ebi-a-GCST002223
3 Age at menopause || id:ieu-a-1004 HDL cholesterol || id:ebi-a-GCST002223
4 Age at menopause || id:ieu-a-1004 HDL cholesterol || id:ebi-a-GCST002223
5 Age at menopause || id:ieu-a-1004 HDL cholesterol || id:ebi-a-GCST002223
6 Age at menopause || id:ieu-a-1004 HDL cholesterol || id:ebi-a-GCST002223
  id.exposure       id.outcome samplesize        SNP            b          se
1  ieu-a-1004 ebi-a-GCST002223      94595  rs1046089  0.040454545 0.016818182
2  ieu-a-1004 ebi-a-GCST002223      94595 rs10813912 -0.030833333 0.040833333
3  ieu-a-1004 ebi-a-GCST002223      94595 rs10905065  0.105454545 0.043636364
4  ieu-a-1004 ebi-a-GCST002223      94595 rs10937153  0.005714286 0.040714286
5  ieu-a-1004 ebi-a-GCST002223      94595 rs11668309 -0.012926829 0.008780488
6  ieu-a-1004 ebi-a-GCST002223      94595 rs11804189 -0.041818182 0.044545455
           p
1 0.01615453
2 0.45018776
3 0.01566335
4 0.88838277
5 0.14096088
6 0.34784602
p2_res_single_anm_to_hdl <- mr_forest_plot(res_single_anm_to_hdl)
p2_res_single_anm_to_hdl[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_res_single_anm_to_hdl <- mr_funnel_plot(res_single_anm_to_hdl)
p4_res_single_anm_to_hdl[[1]]

res_loo_anm_to_hdl <- mr_leaveoneout(data_anm_to_hdl)
head(res_loo_anm_to_hdl)
                           exposure                                outcome
1 Age at menopause || id:ieu-a-1004 HDL cholesterol || id:ebi-a-GCST002223
2 Age at menopause || id:ieu-a-1004 HDL cholesterol || id:ebi-a-GCST002223
3 Age at menopause || id:ieu-a-1004 HDL cholesterol || id:ebi-a-GCST002223
4 Age at menopause || id:ieu-a-1004 HDL cholesterol || id:ebi-a-GCST002223
5 Age at menopause || id:ieu-a-1004 HDL cholesterol || id:ebi-a-GCST002223
6 Age at menopause || id:ieu-a-1004 HDL cholesterol || id:ebi-a-GCST002223
  id.exposure       id.outcome samplesize        SNP            b          se
1  ieu-a-1004 ebi-a-GCST002223      94595  rs1046089 -0.006823979 0.005015016
2  ieu-a-1004 ebi-a-GCST002223      94595 rs10813912 -0.004018941 0.005216537
3  ieu-a-1004 ebi-a-GCST002223      94595 rs10905065 -0.005154399 0.004947920
4  ieu-a-1004 ebi-a-GCST002223      94595 rs10937153 -0.004358155 0.005232623
5  ieu-a-1004 ebi-a-GCST002223      94595 rs11668309 -0.002119108 0.005761988
6  ieu-a-1004 ebi-a-GCST002223      94595 rs11804189 -0.003973163 0.005200089
          p
1 0.1736056
2 0.4410489
3 0.2975366
4 0.4049116
5 0.7130419
6 0.4448334
p_loo_anm_to_hdl <- mr_leaveoneout_plot(res_loo_anm_to_hdl)
p_loo_anm_to_hdl[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

out_anm_to_hdl <- directionality_test(data_anm_to_hdl)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_anm_to_hdl
  id.exposure       id.outcome                          exposure
1  ieu-a-1004 ebi-a-GCST002223 Age at menopause || id:ieu-a-1004
                                 outcome snp_r2.exposure snp_r2.outcome
1 HDL cholesterol || id:ebi-a-GCST002223      0.04007178   0.0005971503
  correct_causal_direction  steiger_pval
1                     TRUE 3.576071e-279
#############################
### Plot results for ANM_to_TG
data_anm_to_tg <- harmonised_results_anm[["ebi-a-GCST002216"]]
res_anm_to_tg  <- mr_results_anm_to_lipids[["ebi-a-GCST002216"]]

p1_res_anm_to_tg <- mr_scatter_plot(res_anm_to_tg, data_anm_to_tg)
p1_res_anm_to_tg[[1]]

mr_heterogeneity(data_anm_to_tg)
  id.exposure       id.outcome                              outcome
1  ieu-a-1004 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
2  ieu-a-1004 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
                           exposure                    method        Q Q_df
1 Age at menopause || id:ieu-a-1004                  MR Egger 406.2676   34
2 Age at menopause || id:ieu-a-1004 Inverse variance weighted 416.8569   35
        Q_pval
1 2.626883e-65
2 7.021756e-67
mr_pleiotropy_test(data_anm_to_tg)
  id.exposure       id.outcome                              outcome
1  ieu-a-1004 ebi-a-GCST002216 Triglycerides || id:ebi-a-GCST002216
                           exposure egger_intercept          se      pval
1 Age at menopause || id:ieu-a-1004     0.005517303 0.005860849 0.3531497
res_single_anm_to_tg <- mr_singlesnp(data_anm_to_tg)
head(res_single_anm_to_tg)
                           exposure                              outcome
1 Age at menopause || id:ieu-a-1004 Triglycerides || id:ebi-a-GCST002216
2 Age at menopause || id:ieu-a-1004 Triglycerides || id:ebi-a-GCST002216
3 Age at menopause || id:ieu-a-1004 Triglycerides || id:ebi-a-GCST002216
4 Age at menopause || id:ieu-a-1004 Triglycerides || id:ebi-a-GCST002216
5 Age at menopause || id:ieu-a-1004 Triglycerides || id:ebi-a-GCST002216
6 Age at menopause || id:ieu-a-1004 Triglycerides || id:ebi-a-GCST002216
  id.exposure       id.outcome samplesize        SNP            b          se
1  ieu-a-1004 ebi-a-GCST002216      94595  rs1046089  0.007727273 0.016363636
2  ieu-a-1004 ebi-a-GCST002216      94595 rs10813912  0.020833333 0.040000000
3  ieu-a-1004 ebi-a-GCST002216      94595 rs10905065 -0.050909091 0.042727273
4  ieu-a-1004 ebi-a-GCST002216      94595 rs10937153  0.029285714 0.039285714
5  ieu-a-1004 ebi-a-GCST002216      94595 rs11668309  0.004146341 0.008536585
6  ieu-a-1004 ebi-a-GCST002216      94595 rs11804189  0.030909091 0.043636364
          p
1 0.6367682
2 0.6024829
3 0.2334615
4 0.4559970
5 0.6271698
6 0.4787383
p2_res_single_anm_to_tg <- mr_forest_plot(res_single_anm_to_tg)
p2_res_single_anm_to_tg[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_res_single_anm_to_tg <- mr_funnel_plot(res_single_anm_to_tg)
p4_res_single_anm_to_tg[[1]]

res_loo_anm_to_tg <- mr_leaveoneout(data_anm_to_tg)
head(res_loo_anm_to_tg)
                           exposure                              outcome
1 Age at menopause || id:ieu-a-1004 Triglycerides || id:ebi-a-GCST002216
2 Age at menopause || id:ieu-a-1004 Triglycerides || id:ebi-a-GCST002216
3 Age at menopause || id:ieu-a-1004 Triglycerides || id:ebi-a-GCST002216
4 Age at menopause || id:ieu-a-1004 Triglycerides || id:ebi-a-GCST002216
5 Age at menopause || id:ieu-a-1004 Triglycerides || id:ebi-a-GCST002216
6 Age at menopause || id:ieu-a-1004 Triglycerides || id:ebi-a-GCST002216
  id.exposure       id.outcome samplesize        SNP          b         se
1  ieu-a-1004 ebi-a-GCST002216      94595  rs1046089 0.01575305 0.01373091
2  ieu-a-1004 ebi-a-GCST002216      94595 rs10813912 0.01526632 0.01341713
3  ieu-a-1004 ebi-a-GCST002216      94595 rs10905065 0.01584900 0.01337083
4  ieu-a-1004 ebi-a-GCST002216      94595 rs10937153 0.01518400 0.01341764
5  ieu-a-1004 ebi-a-GCST002216      94595 rs11668309 0.01810370 0.01489127
6  ieu-a-1004 ebi-a-GCST002216      94595 rs11804189 0.01519688 0.01340555
          p
1 0.2512705
2 0.2551944
3 0.2358824
4 0.2577840
5 0.2240896
6 0.2569513
p_loo_anm_to_tg <- mr_leaveoneout_plot(res_loo_anm_to_tg)
p_loo_anm_to_tg[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

out_anm_to_tg <- directionality_test(data_anm_to_tg)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_anm_to_tg
  id.exposure       id.outcome                          exposure
1  ieu-a-1004 ebi-a-GCST002216 Age at menopause || id:ieu-a-1004
                               outcome snp_r2.exposure snp_r2.outcome
1 Triglycerides || id:ebi-a-GCST002216      0.04007178    0.004320613
  correct_causal_direction  steiger_pval
1                     TRUE 1.412319e-165
#############################
### Plot results for ANM_to_TC
data_anm_to_tc <- harmonised_results_anm[["ebi-a-GCST002221"]]
res_anm_to_tc  <- mr_results_anm_to_lipids[["ebi-a-GCST002221"]]

p1_res_anm_to_tc <- mr_scatter_plot(res_anm_to_tc, data_anm_to_tc)
p1_res_anm_to_tc[[1]]

mr_heterogeneity(data_anm_to_tc)
  id.exposure       id.outcome                                   outcome
1  ieu-a-1004 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
2  ieu-a-1004 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
                           exposure                    method        Q Q_df
1 Age at menopause || id:ieu-a-1004                  MR Egger 67.74300   34
2 Age at menopause || id:ieu-a-1004 Inverse variance weighted 69.67063   35
        Q_pval
1 0.0005083846
2 0.0004394568
mr_pleiotropy_test(data_anm_to_tc)
  id.exposure       id.outcome                                   outcome
1  ieu-a-1004 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221
                           exposure egger_intercept          se      pval
1 Age at menopause || id:ieu-a-1004     0.002529964 0.002572144 0.3322596
res_single_anm_to_tc <- mr_singlesnp(data_anm_to_tc)
head(res_single_anm_to_tc)
                           exposure                                   outcome
1 Age at menopause || id:ieu-a-1004 Cholesterol, total || id:ebi-a-GCST002221
2 Age at menopause || id:ieu-a-1004 Cholesterol, total || id:ebi-a-GCST002221
3 Age at menopause || id:ieu-a-1004 Cholesterol, total || id:ebi-a-GCST002221
4 Age at menopause || id:ieu-a-1004 Cholesterol, total || id:ebi-a-GCST002221
5 Age at menopause || id:ieu-a-1004 Cholesterol, total || id:ebi-a-GCST002221
6 Age at menopause || id:ieu-a-1004 Cholesterol, total || id:ebi-a-GCST002221
  id.exposure       id.outcome samplesize        SNP            b         se
1  ieu-a-1004 ebi-a-GCST002221      94595  rs1046089  0.027272727 0.01772727
2  ieu-a-1004 ebi-a-GCST002221      94595 rs10813912  0.005000000 0.04333333
3  ieu-a-1004 ebi-a-GCST002221      94595 rs10905065 -0.095454545 0.04636364
4  ieu-a-1004 ebi-a-GCST002221      94595 rs10937153  0.003571429 0.04357143
5  ieu-a-1004 ebi-a-GCST002221      94595 rs11668309 -0.022682927 0.00902439
6  ieu-a-1004 ebi-a-GCST002221      94595 rs11804189  0.030000000 0.04727273
           p
1 0.12393581
2 0.90814027
3 0.03951115
4 0.93467279
5 0.01195352
6 0.52567929
p2_res_single_anm_to_tc <- mr_forest_plot(res_single_anm_to_tc)
p2_res_single_anm_to_tc[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_res_single_anm_to_tc <- mr_funnel_plot(res_single_anm_to_tc)
p4_res_single_anm_to_tc[[1]]

res_loo_anm_to_tc <- mr_leaveoneout(data_anm_to_tc)
head(res_loo_anm_to_tc)
                           exposure                                   outcome
1 Age at menopause || id:ieu-a-1004 Cholesterol, total || id:ebi-a-GCST002221
2 Age at menopause || id:ieu-a-1004 Cholesterol, total || id:ebi-a-GCST002221
3 Age at menopause || id:ieu-a-1004 Cholesterol, total || id:ebi-a-GCST002221
4 Age at menopause || id:ieu-a-1004 Cholesterol, total || id:ebi-a-GCST002221
5 Age at menopause || id:ieu-a-1004 Cholesterol, total || id:ebi-a-GCST002221
6 Age at menopause || id:ieu-a-1004 Cholesterol, total || id:ebi-a-GCST002221
  id.exposure       id.outcome samplesize        SNP            b          se
1  ieu-a-1004 ebi-a-GCST002221      94595  rs1046089 -0.004539041 0.005894727
2  ieu-a-1004 ebi-a-GCST002221      94595 rs10813912 -0.002910534 0.005889864
3  ieu-a-1004 ebi-a-GCST002221      94595 rs10905065 -0.002110907 0.005715440
4  ieu-a-1004 ebi-a-GCST002221      94595 rs10937153 -0.002897013 0.005890047
5  ieu-a-1004 ebi-a-GCST002221      94595 rs11668309  0.002312021 0.006288061
6  ieu-a-1004 ebi-a-GCST002221      94595 rs11804189 -0.003088362 0.005866442
          p
1 0.4412897
2 0.6211933
3 0.7118787
4 0.6228262
5 0.7131087
6 0.5985787
p_loo_anm_to_tc <- mr_leaveoneout_plot(res_loo_anm_to_tc)
p_loo_anm_to_tc[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

out_anm_to_tc <- directionality_test(data_anm_to_tc)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_anm_to_tc
  id.exposure       id.outcome                          exposure
1  ieu-a-1004 ebi-a-GCST002221 Age at menopause || id:ieu-a-1004
                                    outcome snp_r2.exposure snp_r2.outcome
1 Cholesterol, total || id:ebi-a-GCST002221      0.04007178   0.0007322501
  correct_causal_direction  steiger_pval
1                     TRUE 4.391643e-271

5.8.1 Results for Forward MR (ANM → LDL, ANM → HDL, ANM → TG, ANM →TC)

5.8.1.1 LDL cholesterol (ANM → LDL)

Method β (effect) SE p-value
MR-Egger 0.0006 0.0092 0.9489 Not significant
Weighted median 0.0047 0.0064 0.4586 Not significant
IVW -0.0035 0.0044 0.4241 Not significant
Simple mode 0.0088 0.0124 0.4826 Not significant
Weighted mode 0.0067 0.0076 0.3875 Not significant

Based on the effects on the table and their distribution on the MR scatter plot, ANM could increase LDL levels, except for IVW estimates, but since all of the estimates are not significant, therefore no causal effect of ANM on LDL.

Sensitivity analyses

  • Heterogeneity -> Insignificant heterogeneity was observed ( MR Egger and IVW Qp-values 0.3250 and 0.3571 respectively), indicating consistent SNP effects.

  • MR-Egger pleiotropy test -> The MR egger intercept was not significant (p-value 0.6141), indicating no evidence of directional pleiotropy.

  • Steiger directionality test -> p = 9.850347e-290, significant, causal direction is correct, ANM to LDL.

  • Single SNP analysis (and the forest plots) -> A few SNPs are significant but the majority are non significant (p-values >0.05 and CI crossing 0). The effect sizes go in both positive and negative directions and with most of them close to 0. MR-Egger and IVW summary estimates overlap but also cross 0, thus not significant, indicating no causal effect of ANM on LDL.

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the estimates are less than 0 with the confidence intervals crossing 0, indicating no SNP shifts/drives the effect.

Conclusion: The MR analysis provides no evidence that genetically predicted ANM has a causal effect on LDL levels.

5.8.1.2 HDL cholesterol (ANM → HDL)

Method β (effect) SE p-value Interpretation
MR-Egger -0.0164 0.0105 0.1290 Not significant
Weighted median -0.0114 0.0058 0.0481 Significant
IVW -0.0043 0.0051 0.4063 Not significant
Simple mode -0.0059 0.0127 0.6464 Not significant
Weighted mode -0.0109 0.0059 0.0742 Not significant

As seen on the table above and MR scatter plot, the beta estimates suggest later ANM causes a decrease in HDL levels. The p-values are all non-significant except for weighted median.

Sensitivity analyses

  • Heterogeneity -> Significant heterogeneity was observed (MR Egger and IVW Qp-values 0.007305 and 0.00495 respectively), indicating inconsistent SNP effects.

  • MR-Egger pleiotropy test -> The MR egger intercept was not significant (p-value 0.1975), indicating no evidence of directional pleiotropy.

  • Steiger directionality test -> p = 63.576071e-279, significant, causal direction is correct, ANM to HDL.

  • Single SNP analysis (and the forest plots) -> A few SNPs are significant but the majority are non significant (p-values >0.05 and CI crossing 0). The effect sizes go in both positive and negative directions and with most of them close to 0. MR-Egger and IVW summary estimates overlap, with MR-Egger crossing 0.

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the estimates are less than 0 with the confidence intervals crossing 0, indicating no SNP shifts/drives the effect.

Conclusion: Mendelian randomization analyses provided evidence that genetically predicted ANM has no causal effect on HDL cholesterol.

5.8.1.3 Triglycerides (ANM → TG)

Method β (effect) SE p-value Interpretation
MR-Egger -0.0072 0.0273 0.7936 Not significant
Weighted median 0.0038 0.0054 0.4825 Not significant
IVW 0.0153 0.0132 0.2446 Not significant
Simple mode 0.0083 0.0090 0.3700 Not significant
Weighted mode 0.0047 0.0050 0.3966 Not significant

The MR estimates from the table above are show that age of menarche has no causal effect on TG levels. The scatter plot shows no clear linear relationship between SNP effects on AAM and TG levels.

  • Heterogeneity -> Significant heterogeneity was observed (MR Egger and IVW Qp-values 2.626883e-65 and 7.021756e-67 respectively), indicating consistent SNP effects.

  • MR-Egger pleiotropy test -> The MR egger intercept was not significant (p-value 0.3531), indicating no evidence of directional horizontal pleiotropy.

  • Steiger directionality test -> 1.412319e-165 significant, causal direction is correct, ANM to TG.

  • Single SNP analysis (and the forest plots) -> A few SNPs are significant but the majority are non significant (p-values >0.05 and CI crossing 0). The effect sizes go in both positive and negative directions and with most of them close to 0. MR-Egger and IVW summary estimates overlap, with MR-Egger crossing 0. However, one SNP is seen to be….

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the estimates are more than 0 with the confidence intervals crossing 0, indicating no SNP shifts/drives the effect.

Conclusion: The MR analyses show no direct causal relationship on ANM on TG levels.

5.8.1.4 Total cholesterol (ANM → TC)

Method β (effect) SE p-value Interpretation
MR-Egger -0.0131 0.0119 0.2798 Not significant
Weighted median -0.0050 0.0065 0.4424 Not significant
IVW -0.0028 0.0058 0.6232 Not significant
Simple mode -0.0015 0.0130 0.9055 Not significant
Weighted mode -0.0072 0.0070 0.3108 Not significant

As seen on the table above and MR scatter plot, the estimates suggests ANM decreases total cholesterol levels but all the estimates are insignificant p>0.05.

Sensitivity analyses

  • Heterogeneity -> Significant heterogeneity was observed ( MR Egger and IVW Qp-values 0.0005 and 0.0004 respectively), indicating SNP consistency.

  • MR-Egger pleiotropy test -> The MR egger intercept was insignificant (p-value 0.3322), indicating no directional pleiotropy.

  • Steiger directionality test -> p = 4.391643e-271, significant, causal direction is correct, ANM to TC.

  • Single SNP analysis (and the forest plots) -> Most of the SNPs show insignificant (p-values >0.05 and CI crossing 0), with a few showing significant values. MR-Egger and IVW summary estimates overlap and close to 0.

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the SNPs CI cross 0 and show have insignificant results, indicating no SNP shifts/drives the effect.

5.8.2 Forward Multivariable MR (MVMR)

Direction: AAM + BMI → HDL or LDL or TG or TC)
Exposures: Age at Menarche, Body Mass Index
Outcome: HDL, LDL, TG and TC
Research Question: Does age at menarche influence the each lipid level independent of BMI? and does BMI affect the AMM independent of each lipid level.

######################################################
# Multivariable MR: ANM + BMI -> Lipids 
######################################################

# 1. Extract multivariable exposures
exp_mvmr_bmi_anm_to_lipids <- mv_extract_exposures(
  id_exposure = c(
    "ieu-a-1004",  # ANM
    "ieu-a-2"      # BMI
  ),
  clump_r2 = 0.001,
  clump_kb = 10000,
  pop = "EUR"
)
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping 1, 121 variants, using EUR population reference
Removing 13 of 121 variants due to LD with other variants or absence from LD reference panel
Extracting data for 108 SNP(s) from 2 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 4
Querying variant chunk 2 of 4
Querying variant chunk 3 of 4
Querying variant chunk 4 of 4
Harmonising Age at menopause || id:ieu-a-1004 (ieu-a-1004) and Body mass index || id:ieu-a-2 (ieu-a-2)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs11647580, rs12599106, rs1558902
# Storage objects
mvmr_results_bmi_anm_to_lipids <- list()
mvmr_data_bmi_anm_to_lipids    <- list()

# 2. Loop over lipid outcomes: harmonise + run MVMR if possible
for (lipid in lipids) {

  # Outcome = lipid
  out_mvmr_bmi_anm_to_lipid <- extract_outcome_data(
    snps     = exp_mvmr_bmi_anm_to_lipids$SNP,
    outcomes = lipid
  )

  # Harmonise
  mv_dat_bmi_anm_to_lipid <- mv_harmonise_data(
    exposure_dat = exp_mvmr_bmi_anm_to_lipids,
    outcome_dat  = out_mvmr_bmi_anm_to_lipid
  )

  # Store harmonised data safely
  if (!is.null(mv_dat_bmi_anm_to_lipid) && is.data.frame(mv_dat_bmi_anm_to_lipid)) {
    mvmr_data_bmi_anm_to_lipids[[lipid]] <- mv_dat_bmi_anm_to_lipid
    nsnps <- nrow(mv_dat_bmi_anm_to_lipid)
  } else {
    mvmr_data_bmi_anm_to_lipids[[lipid]] <- NA
    nsnps <- 0
  }

  cat("Lipid:", lipid, "| SNPs after harmonisation:", nsnps, "\n")

  # Only run MVMR if enough SNPs
  if (nsnps > 3) {
    res_mvmr <- mv_multiple(mv_dat_bmi_anm_to_lipid)
  } else {
    res_mvmr <- NA
    cat("Skipping MVMR for", lipid, "- too few SNPs\n")
  }

  # Store results
  mvmr_results_bmi_anm_to_lipids[[lipid]] <- res_mvmr
}
Extracting data for 105 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 1 SNPs in outcome ebi-a-GCST002222
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Age at menopause || id:ieu-a-1004 (ieu-a-1004) and LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs11031002, rs11852419, rs14810, rs1727326, rs9304665, rs9579083
Lipid: ebi-a-GCST002222 | SNPs after harmonisation: 0 
Skipping MVMR for ebi-a-GCST002222 - too few SNPs
Extracting data for 105 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 1 SNPs in outcome ebi-a-GCST002223
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Age at menopause || id:ieu-a-1004 (ieu-a-1004) and HDL cholesterol || id:ebi-a-GCST002223 (ebi-a-GCST002223)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs11031002, rs11852419, rs14810, rs1727326, rs9304665, rs9579083
Lipid: ebi-a-GCST002223 | SNPs after harmonisation: 0 
Skipping MVMR for ebi-a-GCST002223 - too few SNPs
Extracting data for 105 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 1 SNPs in outcome ebi-a-GCST002216
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Age at menopause || id:ieu-a-1004 (ieu-a-1004) and Triglycerides || id:ebi-a-GCST002216 (ebi-a-GCST002216)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs11031002, rs11852419, rs14810, rs1727326, rs9304665, rs9579083
Lipid: ebi-a-GCST002216 | SNPs after harmonisation: 0 
Skipping MVMR for ebi-a-GCST002216 - too few SNPs
Extracting data for 105 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 1 SNPs in outcome ebi-a-GCST002221
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Age at menopause || id:ieu-a-1004 (ieu-a-1004) and Cholesterol, total || id:ebi-a-GCST002221 (ebi-a-GCST002221)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs11031002, rs11852419, rs14810, rs1727326, rs9304665, rs9579083
Lipid: ebi-a-GCST002221 | SNPs after harmonisation: 0 
Skipping MVMR for ebi-a-GCST002221 - too few SNPs
# 3. Plot MVMR results (only for lipids where MVMR actually ran)

lipid_names <- c(
  "ebi-a-GCST002222" = "LDL Cholesterol",
  "ebi-a-GCST002223" = "HDL Cholesterol",
  "ebi-a-GCST002216" = "Triglycerides",
  "ebi-a-GCST002221" = "Total Cholesterol"
)

for (lipid in lipids) {

  res_obj <- mvmr_results_bmi_anm_to_lipids[[lipid]]

  # Skip if result is missing, NA, or malformed
  if (is.null(res_obj) || is.na(res_obj)[1] || !is.list(res_obj) || !"result" %in% names(res_obj)) {
    message(paste(" Skipping plot for", lipid, "- no valid MVMR result"))
    next
  }

  res_mvmr <- res_obj$result

  p <- ggplot(res_mvmr, aes(x = exposure, y = b)) +
    geom_point(size = 3) +
    geom_errorbar(
      aes(ymin = b - 1.96 * se, ymax = b + 1.96 * se),
      width = 0.1
    ) +
    theme_bw() +
    labs(
      title = paste("MVMR: Direct effects of ANM and BMI on", lipid_names[lipid]),
      x = "Exposure",
      y = "Effect on Lipid"
    )

  print(p)
}
 Skipping plot for ebi-a-GCST002222 - no valid MVMR result
 Skipping plot for ebi-a-GCST002223 - no valid MVMR result
 Skipping plot for ebi-a-GCST002216 - no valid MVMR result
 Skipping plot for ebi-a-GCST002221 - no valid MVMR result

5.8.2.1 Results for Forward MVMR (AAM + BMI → HDL or LDL or TG or TC)

Multivariable MR of ANM and BMI on lipid traits could not be performed because no SNPs remained after harmonization, indicating insufficient shared genetic instruments across exposures and outcomes

5.9 Reverse MR

Direction: Lipids → ANM Exposures: Lipid Traits, Body Mass Index Outcome: ANM Research Question: Do lipid levels influence ANM independent of BMI? and does BMI influence ANM independent of each lipid level.

####################################
# Reverse MR: Lipids → Age at Natural Menopause (ANM)
####################################

mr_results_lipids_to_anm <- list()
harmonised_results_lipids_to_anm <- list()

for(lipid in lipids){

  #Extract instruments for each lipid (WITH clumping)
  exp_lipid <- extract_instruments(
    outcomes = lipid,
    clump = TRUE,
    r2 = 0.001,
    kb = 10000
  )
  
  exp_lipid$F_statistic <- (exp_lipid$beta.exposure^2) /
                           (exp_lipid$se.exposure^2)
  summary(exp_lipid$F_statistic)
  
  #Extract ANM as outcome
  out_anm <- extract_outcome_data(
    snps     = exp_lipid$SNP,
    outcomes = "ieu-a-1004"
  )

  #Harmonise
  dat_lipid_to_anm <- harmonise_data(
    exposure_dat = exp_lipid,
    outcome_dat  = out_anm
  )

  harmonised_results_lipids_to_anm[[lipid]] <- dat_lipid_to_anm

  #Run MR
  if(nrow(dat_lipid_to_anm) > 3){
    res_lipid_to_anm <- mr(dat_lipid_to_anm)
  } else {
    res_lipid_to_anm <- NA
  }

  mr_results_lipids_to_anm[[lipid]] <- res_lipid_to_anm
}
Extracting data for 75 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 8 SNPs in outcome ieu-a-1004
Extracting data for 8 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222) and Age at menopause || id:ieu-a-1004 (ieu-a-1004)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs2954029, rs3758348, rs964184
Analysing 'ebi-a-GCST002222' on 'ieu-a-1004'
Extracting data for 87 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 3 SNPs in outcome ieu-a-1004
Extracting data for 3 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising HDL cholesterol || id:ebi-a-GCST002223 (ebi-a-GCST002223) and Age at menopause || id:ieu-a-1004 (ieu-a-1004)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs9491696
Analysing 'ebi-a-GCST002223' on 'ieu-a-1004'
Extracting data for 56 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Finding proxies for 1 SNPs in outcome ieu-a-1004
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Triglycerides || id:ebi-a-GCST002216 (ebi-a-GCST002216) and Age at menopause || id:ieu-a-1004 (ieu-a-1004)
Analysing 'ebi-a-GCST002216' on 'ieu-a-1004'
Extracting data for 88 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 2
Querying variant chunk 2 of 2
Finding proxies for 3 SNPs in outcome ieu-a-1004
Extracting data for 3 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising Cholesterol, total || id:ebi-a-GCST002221 (ebi-a-GCST002221) and Age at menopause || id:ieu-a-1004 (ieu-a-1004)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs2156552, rs2954029, rs3758348, rs378479, rs581080
Analysing 'ebi-a-GCST002221' on 'ieu-a-1004'
mr_results_lipids_to_anm
$`ebi-a-GCST002222`
       id.exposure id.outcome                           outcome
1 ebi-a-GCST002222 ieu-a-1004 Age at menopause || id:ieu-a-1004
2 ebi-a-GCST002222 ieu-a-1004 Age at menopause || id:ieu-a-1004
3 ebi-a-GCST002222 ieu-a-1004 Age at menopause || id:ieu-a-1004
4 ebi-a-GCST002222 ieu-a-1004 Age at menopause || id:ieu-a-1004
5 ebi-a-GCST002222 ieu-a-1004 Age at menopause || id:ieu-a-1004
                                exposure                    method nsnp
1 LDL cholesterol || id:ebi-a-GCST002222                  MR Egger   65
2 LDL cholesterol || id:ebi-a-GCST002222           Weighted median   65
3 LDL cholesterol || id:ebi-a-GCST002222 Inverse variance weighted   65
4 LDL cholesterol || id:ebi-a-GCST002222               Simple mode   65
5 LDL cholesterol || id:ebi-a-GCST002222             Weighted mode   65
            b         se      pval
1 -0.08648141 0.14618822 0.5562516
2 -0.06934447 0.09114381 0.4467617
3 -0.09453072 0.07978731 0.2361029
4 -0.18902100 0.20863910 0.3683494
5 -0.10213173 0.08614803 0.2401881

$`ebi-a-GCST002223`
       id.exposure id.outcome                           outcome
1 ebi-a-GCST002223 ieu-a-1004 Age at menopause || id:ieu-a-1004
2 ebi-a-GCST002223 ieu-a-1004 Age at menopause || id:ieu-a-1004
3 ebi-a-GCST002223 ieu-a-1004 Age at menopause || id:ieu-a-1004
4 ebi-a-GCST002223 ieu-a-1004 Age at menopause || id:ieu-a-1004
5 ebi-a-GCST002223 ieu-a-1004 Age at menopause || id:ieu-a-1004
                                exposure                    method nsnp
1 HDL cholesterol || id:ebi-a-GCST002223                  MR Egger   86
2 HDL cholesterol || id:ebi-a-GCST002223           Weighted median   86
3 HDL cholesterol || id:ebi-a-GCST002223 Inverse variance weighted   86
4 HDL cholesterol || id:ebi-a-GCST002223               Simple mode   86
5 HDL cholesterol || id:ebi-a-GCST002223             Weighted mode   86
            b         se       pval
1 -0.14896133 0.11184647 0.18651616
2 -0.11981333 0.07468469 0.10865774
3 -0.06099873 0.07072050 0.38839456
4 -0.26067392 0.16433744 0.11640475
5 -0.12088473 0.06549161 0.06840192

$`ebi-a-GCST002216`
       id.exposure id.outcome                           outcome
1 ebi-a-GCST002216 ieu-a-1004 Age at menopause || id:ieu-a-1004
2 ebi-a-GCST002216 ieu-a-1004 Age at menopause || id:ieu-a-1004
3 ebi-a-GCST002216 ieu-a-1004 Age at menopause || id:ieu-a-1004
4 ebi-a-GCST002216 ieu-a-1004 Age at menopause || id:ieu-a-1004
5 ebi-a-GCST002216 ieu-a-1004 Age at menopause || id:ieu-a-1004
                              exposure                    method nsnp
1 Triglycerides || id:ebi-a-GCST002216                  MR Egger   55
2 Triglycerides || id:ebi-a-GCST002216           Weighted median   55
3 Triglycerides || id:ebi-a-GCST002216 Inverse variance weighted   55
4 Triglycerides || id:ebi-a-GCST002216               Simple mode   55
5 Triglycerides || id:ebi-a-GCST002216             Weighted mode   55
           b         se       pval
1 0.25345758 0.15603427 0.11022972
2 0.18752336 0.11367738 0.09902271
3 0.21965075 0.09404959 0.01951847
4 0.27581040 0.22487196 0.22532365
5 0.09464564 0.12794188 0.46265267

$`ebi-a-GCST002221`
       id.exposure id.outcome                           outcome
1 ebi-a-GCST002221 ieu-a-1004 Age at menopause || id:ieu-a-1004
2 ebi-a-GCST002221 ieu-a-1004 Age at menopause || id:ieu-a-1004
3 ebi-a-GCST002221 ieu-a-1004 Age at menopause || id:ieu-a-1004
4 ebi-a-GCST002221 ieu-a-1004 Age at menopause || id:ieu-a-1004
5 ebi-a-GCST002221 ieu-a-1004 Age at menopause || id:ieu-a-1004
                                   exposure                    method nsnp
1 Cholesterol, total || id:ebi-a-GCST002221                  MR Egger   81
2 Cholesterol, total || id:ebi-a-GCST002221           Weighted median   81
3 Cholesterol, total || id:ebi-a-GCST002221 Inverse variance weighted   81
4 Cholesterol, total || id:ebi-a-GCST002221               Simple mode   81
5 Cholesterol, total || id:ebi-a-GCST002221             Weighted mode   81
            b         se      pval
1 -0.09505610 0.18138051 0.6016971
2 -0.13505582 0.09055978 0.1358711
3 -0.08205626 0.08843717 0.3534863
4 -0.25020267 0.16557458 0.1346986
5 -0.18173246 0.08672018 0.0392781
#############################
### Visualization: LDL → ANM
data_ldl_to_anm <- harmonised_results_lipids_to_anm[["ebi-a-GCST002222"]]
res_ldl_to_anm  <- mr_results_lipids_to_anm[["ebi-a-GCST002222"]]

p1_ldl_to_anm <- mr_scatter_plot(res_ldl_to_anm, data_ldl_to_anm)
p1_ldl_to_anm[[1]]

mr_heterogeneity(data_ldl_to_anm)
       id.exposure id.outcome                           outcome
1 ebi-a-GCST002222 ieu-a-1004 Age at menopause || id:ieu-a-1004
2 ebi-a-GCST002222 ieu-a-1004 Age at menopause || id:ieu-a-1004
                                exposure                    method        Q
1 LDL cholesterol || id:ebi-a-GCST002222                  MR Egger 127.3049
2 LDL cholesterol || id:ebi-a-GCST002222 Inverse variance weighted 127.3137
  Q_df       Q_pval
1   63 3.001923e-06
2   64 4.335037e-06
mr_pleiotropy_test(data_ldl_to_anm)
       id.exposure id.outcome                           outcome
1 ebi-a-GCST002222 ieu-a-1004 Age at menopause || id:ieu-a-1004
                                exposure egger_intercept          se      pval
1 LDL cholesterol || id:ebi-a-GCST002222   -0.0005016846 0.007609028 0.9476401
res_single_ldl_to_anm <- mr_singlesnp(data_ldl_to_anm)
head(res_single_ldl_to_anm)
                                exposure                           outcome
1 LDL cholesterol || id:ebi-a-GCST002222 Age at menopause || id:ieu-a-1004
2 LDL cholesterol || id:ebi-a-GCST002222 Age at menopause || id:ieu-a-1004
3 LDL cholesterol || id:ebi-a-GCST002222 Age at menopause || id:ieu-a-1004
4 LDL cholesterol || id:ebi-a-GCST002222 Age at menopause || id:ieu-a-1004
5 LDL cholesterol || id:ebi-a-GCST002222 Age at menopause || id:ieu-a-1004
6 LDL cholesterol || id:ebi-a-GCST002222 Age at menopause || id:ieu-a-1004
       id.exposure id.outcome samplesize        SNP          b        se
1 ebi-a-GCST002222 ieu-a-1004      69360 rs10195252  2.1008403 0.8403361
2 ebi-a-GCST002222 ieu-a-1004      69360  rs1030431 -1.1627907 0.5813953
3 ebi-a-GCST002222 ieu-a-1004      69360 rs10832962 -1.2500000 0.6250000
4 ebi-a-GCST002222 ieu-a-1004      69360 rs10947332  0.9920635 0.7936508
5 ebi-a-GCST002222 ieu-a-1004      69360 rs11065987  0.7434944 0.7434944
6 ebi-a-GCST002222 ieu-a-1004      69360 rs11220462 -0.1694915 0.5084746
           p
1 0.01241933
2 0.04550026
3 0.04550026
4 0.21129955
5 0.31731051
6 0.73888268
p2_ldl_to_anm <- mr_forest_plot(res_single_ldl_to_anm)
p2_ldl_to_anm[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_ldl_to_anm <- mr_funnel_plot(res_single_ldl_to_anm)
p4_ldl_to_anm[[1]]

res_loo_ldl_to_anm <- mr_leaveoneout(data_ldl_to_anm)
head(res_loo_ldl_to_anm)
                                exposure                           outcome
1 LDL cholesterol || id:ebi-a-GCST002222 Age at menopause || id:ieu-a-1004
2 LDL cholesterol || id:ebi-a-GCST002222 Age at menopause || id:ieu-a-1004
3 LDL cholesterol || id:ebi-a-GCST002222 Age at menopause || id:ieu-a-1004
4 LDL cholesterol || id:ebi-a-GCST002222 Age at menopause || id:ieu-a-1004
5 LDL cholesterol || id:ebi-a-GCST002222 Age at menopause || id:ieu-a-1004
6 LDL cholesterol || id:ebi-a-GCST002222 Age at menopause || id:ieu-a-1004
       id.exposure id.outcome samplesize        SNP           b         se
1 ebi-a-GCST002222 ieu-a-1004      69360 rs10195252 -0.10452489 0.07840057
2 ebi-a-GCST002222 ieu-a-1004      69360  rs1030431 -0.08432044 0.07971254
3 ebi-a-GCST002222 ieu-a-1004      69360 rs10832962 -0.08498643 0.07964914
4 ebi-a-GCST002222 ieu-a-1004      69360 rs10947332 -0.10007944 0.08002435
5 ebi-a-GCST002222 ieu-a-1004      69360 rs11065987 -0.09941044 0.08024607
6 ebi-a-GCST002222 ieu-a-1004      69360 rs11220462 -0.09359126 0.08091341
          p
1 0.1824609
2 0.2901437
3 0.2859673
4 0.2110759
5 0.2154121
6 0.2474015
p_loo_ldl_to_anm <- mr_leaveoneout_plot(res_loo_ldl_to_anm)
p_loo_ldl_to_anm[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

out_ldl_to_anm <- directionality_test(data_ldl_to_anm)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_ldl_to_anm
       id.exposure id.outcome                               exposure
1 ebi-a-GCST002222 ieu-a-1004 LDL cholesterol || id:ebi-a-GCST002222
                            outcome snp_r2.exposure snp_r2.outcome
1 Age at menopause || id:ieu-a-1004      0.08177302    0.001616748
  correct_causal_direction steiger_pval
1                     TRUE            0
#############################
### Visualization: HDL → ANM
data_hdl_to_anm <- harmonised_results_lipids_to_anm[["ebi-a-GCST002223"]]
res_hdl_to_anm  <- mr_results_lipids_to_anm[["ebi-a-GCST002223"]]

p1_hdl_to_anm <- mr_scatter_plot(res_hdl_to_anm, data_hdl_to_anm)
p1_hdl_to_anm[[1]]

mr_heterogeneity(data_hdl_to_anm)
       id.exposure id.outcome                           outcome
1 ebi-a-GCST002223 ieu-a-1004 Age at menopause || id:ieu-a-1004
2 ebi-a-GCST002223 ieu-a-1004 Age at menopause || id:ieu-a-1004
                                exposure                    method        Q
1 HDL cholesterol || id:ebi-a-GCST002223                  MR Egger 181.4383
2 HDL cholesterol || id:ebi-a-GCST002223 Inverse variance weighted 183.6637
  Q_df       Q_pval
1   84 3.952637e-09
2   85 3.176397e-09
mr_pleiotropy_test(data_hdl_to_anm)
       id.exposure id.outcome                           outcome
1 ebi-a-GCST002223 ieu-a-1004 Age at menopause || id:ieu-a-1004
                                exposure egger_intercept        se     pval
1 HDL cholesterol || id:ebi-a-GCST002223     0.005976983 0.0058885 0.313008
res_single_hdl_to_anm <- mr_singlesnp(data_hdl_to_anm)
head(res_single_hdl_to_anm)
                                exposure                           outcome
1 HDL cholesterol || id:ebi-a-GCST002223 Age at menopause || id:ieu-a-1004
2 HDL cholesterol || id:ebi-a-GCST002223 Age at menopause || id:ieu-a-1004
3 HDL cholesterol || id:ebi-a-GCST002223 Age at menopause || id:ieu-a-1004
4 HDL cholesterol || id:ebi-a-GCST002223 Age at menopause || id:ieu-a-1004
5 HDL cholesterol || id:ebi-a-GCST002223 Age at menopause || id:ieu-a-1004
6 HDL cholesterol || id:ebi-a-GCST002223 Age at menopause || id:ieu-a-1004
       id.exposure id.outcome samplesize        SNP           b        se
1 ebi-a-GCST002223 ieu-a-1004      69360 rs10019888  1.85185185 1.1111111
2 ebi-a-GCST002223 ieu-a-1004      69360 rs10087900  0.43290043 0.8658009
3 ebi-a-GCST002223 ieu-a-1004      69360 rs10282707  1.20000000 0.8000000
4 ebi-a-GCST002223 ieu-a-1004      69360 rs10468017 -0.08481764 0.1696353
5 ebi-a-GCST002223 ieu-a-1004      69360  rs1047891  0.37174721 1.4869888
6 ebi-a-GCST002223 ieu-a-1004      69360 rs10761771  1.51515152 1.0101010
          p
1 0.0955807
2 0.6170751
3 0.1336144
4 0.6170751
5 0.8025873
6 0.1336144
p2_hdl_to_anm <- mr_forest_plot(res_single_hdl_to_anm)
p2_hdl_to_anm[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_hdl_to_anm <- mr_funnel_plot(res_single_hdl_to_anm)
p4_hdl_to_anm[[1]]

res_loo_hdl_to_anm <- mr_leaveoneout(data_hdl_to_anm)
head(res_loo_hdl_to_anm)
                                exposure                           outcome
1 HDL cholesterol || id:ebi-a-GCST002223 Age at menopause || id:ieu-a-1004
2 HDL cholesterol || id:ebi-a-GCST002223 Age at menopause || id:ieu-a-1004
3 HDL cholesterol || id:ebi-a-GCST002223 Age at menopause || id:ieu-a-1004
4 HDL cholesterol || id:ebi-a-GCST002223 Age at menopause || id:ieu-a-1004
5 HDL cholesterol || id:ebi-a-GCST002223 Age at menopause || id:ieu-a-1004
6 HDL cholesterol || id:ebi-a-GCST002223 Age at menopause || id:ieu-a-1004
       id.exposure id.outcome samplesize        SNP           b         se
1 ebi-a-GCST002223 ieu-a-1004      69360 rs10019888 -0.06459181 0.07062903
2 ebi-a-GCST002223 ieu-a-1004      69360 rs10087900 -0.06252851 0.07118695
3 ebi-a-GCST002223 ieu-a-1004      69360 rs10282707 -0.06557587 0.07078374
4 ebi-a-GCST002223 ieu-a-1004      69360 rs10468017 -0.05891522 0.07418207
5 ebi-a-GCST002223 ieu-a-1004      69360  rs1047891 -0.06145221 0.07116104
6 ebi-a-GCST002223 ieu-a-1004      69360 rs10761771 -0.06458250 0.07074630
          p
1 0.3604426
2 0.3797427
3 0.3542249
4 0.4270804
5 0.3878267
6 0.3613085
p_loo_hdl_to_anm <- mr_leaveoneout_plot(res_loo_hdl_to_anm)
p_loo_hdl_to_anm[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

out_hdl_to_anm <- directionality_test(data_hdl_to_anm)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_hdl_to_anm
       id.exposure id.outcome                               exposure
1 ebi-a-GCST002223 ieu-a-1004 HDL cholesterol || id:ebi-a-GCST002223
                            outcome snp_r2.exposure snp_r2.outcome
1 Age at menopause || id:ieu-a-1004      0.09493388    0.002575673
  correct_causal_direction steiger_pval
1                     TRUE            0
#############################
### Visualization: TG → ANM
data_tg_to_anm <- harmonised_results_lipids_to_anm[["ebi-a-GCST002216"]]
res_tg_to_anm  <- mr_results_lipids_to_anm[["ebi-a-GCST002216"]]

p1_tg_to_anm <- mr_scatter_plot(res_tg_to_anm, data_tg_to_anm)
p1_tg_to_anm[[1]]

mr_heterogeneity(data_tg_to_anm)
       id.exposure id.outcome                           outcome
1 ebi-a-GCST002216 ieu-a-1004 Age at menopause || id:ieu-a-1004
2 ebi-a-GCST002216 ieu-a-1004 Age at menopause || id:ieu-a-1004
                              exposure                    method        Q Q_df
1 Triglycerides || id:ebi-a-GCST002216                  MR Egger 119.6649   53
2 Triglycerides || id:ebi-a-GCST002216 Inverse variance weighted 119.8331   54
        Q_pval
1 4.609612e-07
2 6.721188e-07
mr_pleiotropy_test(data_tg_to_anm)
       id.exposure id.outcome                           outcome
1 ebi-a-GCST002216 ieu-a-1004 Age at menopause || id:ieu-a-1004
                              exposure egger_intercept          se      pval
1 Triglycerides || id:ebi-a-GCST002216    -0.002065887 0.007570343 0.7859966
res_single_tg_to_anm <- mr_singlesnp(data_tg_to_anm)
head(res_single_tg_to_anm)
                              exposure                           outcome
1 Triglycerides || id:ebi-a-GCST002216 Age at menopause || id:ieu-a-1004
2 Triglycerides || id:ebi-a-GCST002216 Age at menopause || id:ieu-a-1004
3 Triglycerides || id:ebi-a-GCST002216 Age at menopause || id:ieu-a-1004
4 Triglycerides || id:ebi-a-GCST002216 Age at menopause || id:ieu-a-1004
5 Triglycerides || id:ebi-a-GCST002216 Age at menopause || id:ieu-a-1004
6 Triglycerides || id:ebi-a-GCST002216 Age at menopause || id:ieu-a-1004
       id.exposure id.outcome samplesize        SNP           b        se
1 ebi-a-GCST002216 ieu-a-1004      69360 rs10401969 -0.49586777 0.3305785
2 ebi-a-GCST002216 ieu-a-1004      69360 rs10426094  0.41493776 1.2448133
3 ebi-a-GCST002216 ieu-a-1004      69360 rs10440120 -0.65359477 0.9803922
4 ebi-a-GCST002216 ieu-a-1004      69360 rs10501321  1.85185185 0.9259259
5 ebi-a-GCST002216 ieu-a-1004      69360 rs10790162 -0.04338395 0.1735358
6 ebi-a-GCST002216 ieu-a-1004      69360 rs11057408 -1.55038760 0.7751938
           p
1 0.13361440
2 0.73888268
3 0.50498508
4 0.04550026
5 0.80258735
6 0.04550026
p2_tg_to_anm <- mr_forest_plot(res_single_tg_to_anm)
p2_tg_to_anm[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_tg_to_anm <- mr_funnel_plot(res_single_tg_to_anm)
p4_tg_to_anm[[1]]

res_loo_tg_to_anm <- mr_leaveoneout(data_tg_to_anm)
head(res_loo_tg_to_anm)
                              exposure                           outcome
1 Triglycerides || id:ebi-a-GCST002216 Age at menopause || id:ieu-a-1004
2 Triglycerides || id:ebi-a-GCST002216 Age at menopause || id:ieu-a-1004
3 Triglycerides || id:ebi-a-GCST002216 Age at menopause || id:ieu-a-1004
4 Triglycerides || id:ebi-a-GCST002216 Age at menopause || id:ieu-a-1004
5 Triglycerides || id:ebi-a-GCST002216 Age at menopause || id:ieu-a-1004
6 Triglycerides || id:ebi-a-GCST002216 Age at menopause || id:ieu-a-1004
       id.exposure id.outcome samplesize        SNP         b         se
1 ebi-a-GCST002216 ieu-a-1004      69360 rs10401969 0.2467364 0.09473049
2 ebi-a-GCST002216 ieu-a-1004      69360 rs10426094 0.2191471 0.09504526
3 ebi-a-GCST002216 ieu-a-1004      69360 rs10440120 0.2232872 0.09481342
4 ebi-a-GCST002216 ieu-a-1004      69360 rs10501321 0.2120269 0.09390650
5 ebi-a-GCST002216 ieu-a-1004      69360 rs10790162 0.2597767 0.10078449
6 ebi-a-GCST002216 ieu-a-1004      69360 rs11057408 0.2314698 0.09313989
            p
1 0.009197772
2 0.021126654
3 0.018521887
4 0.023954962
5 0.009950443
6 0.012948431
p_loo_tg_to_anm <- mr_leaveoneout_plot(res_loo_tg_to_anm)
p_loo_tg_to_anm[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

out_tg_to_anm <- directionality_test(data_tg_to_anm)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_tg_to_anm
       id.exposure id.outcome                             exposure
1 ebi-a-GCST002216 ieu-a-1004 Triglycerides || id:ebi-a-GCST002216
                            outcome snp_r2.exposure snp_r2.outcome
1 Age at menopause || id:ieu-a-1004      0.08174223    0.001753837
  correct_causal_direction steiger_pval
1                     TRUE            0
#############################
### Plot results for ANM_to_TC

data_tc_to_anm <- harmonised_results_lipids_to_anm[["ebi-a-GCST002221"]]
res_tc_to_anm  <- mr_results_lipids_to_anm[["ebi-a-GCST002221"]]

p1_tc_to_anm <- mr_scatter_plot(res_tc_to_anm, data_tc_to_anm)
p1_tc_to_anm[[1]]

mr_heterogeneity(data_tc_to_anm)
       id.exposure id.outcome                           outcome
1 ebi-a-GCST002221 ieu-a-1004 Age at menopause || id:ieu-a-1004
2 ebi-a-GCST002221 ieu-a-1004 Age at menopause || id:ieu-a-1004
                                   exposure                    method        Q
1 Cholesterol, total || id:ebi-a-GCST002221                  MR Egger 206.2419
2 Cholesterol, total || id:ebi-a-GCST002221 Inverse variance weighted 206.2596
  Q_df       Q_pval
1   79 2.603184e-13
2   80 4.227799e-13
mr_pleiotropy_test(data_tc_to_anm)
       id.exposure id.outcome                           outcome
1 ebi-a-GCST002221 ieu-a-1004 Age at menopause || id:ieu-a-1004
                                   exposure egger_intercept          se
1 Cholesterol, total || id:ebi-a-GCST002221    0.0007082987 0.008611323
       pval
1 0.9346544
res_single_tc_to_anm <- mr_singlesnp(data_tc_to_anm)
head(res_single_tc_to_anm)
                                   exposure                           outcome
1 Cholesterol, total || id:ebi-a-GCST002221 Age at menopause || id:ieu-a-1004
2 Cholesterol, total || id:ebi-a-GCST002221 Age at menopause || id:ieu-a-1004
3 Cholesterol, total || id:ebi-a-GCST002221 Age at menopause || id:ieu-a-1004
4 Cholesterol, total || id:ebi-a-GCST002221 Age at menopause || id:ieu-a-1004
5 Cholesterol, total || id:ebi-a-GCST002221 Age at menopause || id:ieu-a-1004
6 Cholesterol, total || id:ebi-a-GCST002221 Age at menopause || id:ieu-a-1004
       id.exposure id.outcome samplesize        SNP          b        se
1 ebi-a-GCST002221 ieu-a-1004      69360 rs10088180 -0.8771930 0.8771930
2 ebi-a-GCST002221 ieu-a-1004      69360 rs10468017 -0.1620746 0.3241491
3 ebi-a-GCST002221 ieu-a-1004      69360 rs10490626 -0.9638554 0.9638554
4 ebi-a-GCST002221 ieu-a-1004      69360 rs10750219 -0.3571429 0.7142857
5 ebi-a-GCST002221 ieu-a-1004      69360 rs10773003  0.8130081 1.0840108
6 ebi-a-GCST002221 ieu-a-1004      69360 rs10832962 -1.2698413 0.6349206
           p
1 0.31731051
2 0.61707508
3 0.31731051
4 0.61707508
5 0.45325470
6 0.04550026
p2_tc_to_anm <- mr_forest_plot(res_single_tc_to_anm)
p2_tc_to_anm[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

p4_tc_to_anm <- mr_funnel_plot(res_single_tc_to_anm)
p4_tc_to_anm[[1]]

res_loo_tc_to_anm <- mr_leaveoneout(data_tc_to_anm)
head(res_loo_tc_to_anm)
                                   exposure                           outcome
1 Cholesterol, total || id:ebi-a-GCST002221 Age at menopause || id:ieu-a-1004
2 Cholesterol, total || id:ebi-a-GCST002221 Age at menopause || id:ieu-a-1004
3 Cholesterol, total || id:ebi-a-GCST002221 Age at menopause || id:ieu-a-1004
4 Cholesterol, total || id:ebi-a-GCST002221 Age at menopause || id:ieu-a-1004
5 Cholesterol, total || id:ebi-a-GCST002221 Age at menopause || id:ieu-a-1004
6 Cholesterol, total || id:ebi-a-GCST002221 Age at menopause || id:ieu-a-1004
       id.exposure id.outcome samplesize        SNP           b         se
1 ebi-a-GCST002221 ieu-a-1004      69360 rs10088180 -0.07890915 0.08899259
2 ebi-a-GCST002221 ieu-a-1004      69360 rs10468017 -0.07967741 0.09029457
3 ebi-a-GCST002221 ieu-a-1004      69360 rs10490626 -0.07916750 0.08895915
4 ebi-a-GCST002221 ieu-a-1004      69360 rs10750219 -0.08041090 0.08922860
5 ebi-a-GCST002221 ieu-a-1004      69360 rs10773003 -0.08437289 0.08896246
6 ebi-a-GCST002221 ieu-a-1004      69360 rs10832962 -0.07305041 0.08856497
          p
1 0.3752439
2 0.3775517
3 0.3735030
4 0.3674934
5 0.3429208
6 0.4094722
p_loo_tc_to_anm <- mr_leaveoneout_plot(res_loo_tc_to_anm)
p_loo_tc_to_anm[[1]]
Warning: Removed 1 row containing missing values or values outside the scale range
(`geom_point()`).

out_tc_to_anm <- directionality_test(data_tc_to_anm)
r.exposure and/or r.outcome not present.
Calculating approximate SNP-exposure and/or SNP-outcome correlations, assuming all are quantitative traits. Please pre-calculate r.exposure and/or r.outcome using get_r_from_lor() for any binary traits
out_tc_to_anm
       id.exposure id.outcome                                  exposure
1 ebi-a-GCST002221 ieu-a-1004 Cholesterol, total || id:ebi-a-GCST002221
                            outcome snp_r2.exposure snp_r2.outcome
1 Age at menopause || id:ieu-a-1004       0.1035706    0.002788592
  correct_causal_direction steiger_pval
1                     TRUE            0

5.9.0.1 Results for Reverse MR (Lipids → ANM)

5.9.0.2 LDL cholesterol (LDL → ANM)

Method β (Effect) SE p-value Interpretation
MR-Egger -0.0865 0.1462 0.5563 Not significant
Weighted Median -0.0693 0.0952 0.664 Not significant
IVW -0.0945 0.0798 0.2361 Not significant
Simple Mode -0.1890 0.2077 0.3662 Not significant
Weighted Mode -0.1021 0.0844 0.2307 Not significant

As seen on the table above and MR scatter plot, the estimates are negative meaning higher LDL levels leads to earlier age at menopause. However all the values are insignificant.

Sensitivity analyses

  • Heterogeneity -> Significant heterogeneity was observed ( MR Egger and IVW Qp-values 3.001923e-06 nd 4.335037e-06 respectively), indicating inconsistent SNP effects.

  • MR-Egger pleiotropy test -> The MR egger intercept was not significant (p-value 0.9476), indicating no evidence of directional pleiotropy.

  • Steiger directionality test -> p = 0, significant, causal direction is correct, ANM to LDL.

  • Single SNP analysis (and the forest plot) -> Most SNPs show insignificant (p-values >0.05 and CI crossing 0). The effect sizes go in both positive and negative directions. MR-Egger and IVW summary estimates overlap but also cross 0, thus not significant, indicating no specific outliers.

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the SNPs CI cross 0 and show have insignificant results, indicating no SNP shifts/drives the effect.

5.9.0.3 HDL cholesterol (HDL → ANM)

Method β (Effect) SE p-value Interpretation
MR-Egger -0.1490 0.1118 0.1865 Not significant
Weighted Median -0.1198 0.0764 0.1169 Not significant
IVW -0.0610 0.0707 0.3884 Not significant
Simple Mode -0.2607 0.1632 0.1139 Not significant
Weighted Mode -0.1209 0.0607 0.0497 Not significant (borderline)

As seen on the table above and MR scatter plot, the estimates are negative meaning higher LDL levels leads to earlier age at menopause. However all the values are insignificant.

Sensitivity analyses

  • Heterogeneity -> Significant heterogeneity was observed ( MR Egger and IVW Qp-values 3.952637e-09 and 3.176397e-09 respectively), indicating inconsistent SNP effects and suggesting possible pleiotropic effects.

  • MR-Egger pleiotropy test -> The MR egger intercept was not significant (p-value 0.3130), indicating no evidence of directional pleiotropy.

  • Steiger directionality test -> p = 0, significant, causal direction is correct, HDL to AAM.

  • Single SNP analysis (and the forest plots) -> Most SNPs show insignificant (p-values >0.05 and CI crossing 0). MR-Egger and IVW summary estimates overlap and close to 0, thus not significant. Although a few individual SNPs appear significant, these do not influence the overall causal estimate, and no single SNP appears to be driving the result.

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis -> All p-values remained insignificant, suggesting no SNP is driving the observed effect.

    • LOO plot -> Each dot represents the IVW estimate after removing one SNP at a time. All the SNPs CI cross 0 and show have insignificant results, indicating no SNP shifts/drives the effect.

Conclusion: TC does not causally influence age at menopause.

5.9.0.4 Triglycerides (TG → ANM)

Method β (Effect) SE p-value Interpretation
MR-Egger 0.2535 0.1560 0.1102 Not significant
Weighted Median 0.1875 0.1093 0.0863 Not significant
IVW 0.2197 0.0940 0.0195 Significant
Simple Mode 0.2758 0.2324 0.2406 Not significant
Weighted Mode 0.0946 0.1204 0.4354 Not significant

As seen on the table above and MR scatter plot, the estimates are positive indicating higher TGs delays. The p-values is significant for IVW which is our main method, suggesting causal effect of TG levels on ANM.

Sensitivity analyses

  • Heterogeneity -> Significant heterogeneity was observed ( MR Egger and IVW Qp-values 4.609612e-07 and 6.721188e-07 respectively), indicating inconsistent SNP effects.

  • MR-Egger pleiotropy test -> The MR egger intercept was insignificant (p-value 0.7859), indicating evidence for no directional pleiotropy.

  • Steiger directionality test -> p = 0, significant, causal direction is correct, TG to ANM.

  • Single SNP analysis (and the forest plots) -> Most of the SNPs show insignificant (p-values >0.05 and CI crossing 0), indicating no specific outliers. The effect sizes go in both positive and negative direction. MR-Egger and IVW summary estimates overlap. IVW does not cross 0 showing significant estimates.

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis(and LOO plot) -> Some of the leave-one-out estimates remained statistically significant and on the same side of the null, with confidence intervals not crossing 0. This indicates that the causal estimate is not driven by any individual genetic variant.

Conclusion: TG causally affect age at natural menopause.

5.9.0.5 Total cholesterol (TC → ANM)

Method β SE p-value Interpretation
MR-Egger -0.0951 0.1814 0.6017 Not significant
Weighted Median -0.1351 0.0923 0.1434 Not significant
IVW -0.0821 0.0884 0.3535 Not significant
Simple Mode -0.2502 0.1785 0.1648 Not significant
Weighted Mode -0.1817 0.0977 0.0667 Not significant

As seen on the table above and MR scatter plot, the estimates lie close to 0 with some most showing positive effect sizes but the p-values are insignificant, suggesting no causal effect of TG levels to ANM.

Sensitivity analyses

  • Heterogeneity -> Borderline significant heterogeneity was observed ( MR Egger and IVW Qp-values 0.0005 and 0.0004 respectively), indicating some SNOs inconsistency.

  • MR-Egger pleiotropy test -> The MR egger intercept was insignificant (p-value 0.3322), indicating no directional pleiotropy.

  • Steiger directionality test -> p =4.391643e-271 significant, causal direction is correct, TC to ANM.

  • Single SNP analysis (and the forest plots) -> The SNPs show insignificant (p-values >0.05 and CI crossing 0). MR-Egger and IVW summary estimates overlap and close to 0, thus not significant.

    • Funnel plot: The SNPs show symmetrical distribution, indicating no directional horizontal pleiotropy.
  • Leave-one-out analysis(and LOO plot) -> Most of the leave-one-out estimates remained statistically insignificant and on the same side of the null, with confidence intervals crossing 0. This indicates that the causal estimate is not driven by any individual genetic variant.

Conclusion: TC does not influence age at natural menopause.

5.9.1 Reverse Multivariable MR (MVMR)

Direction: Lipids + BMI → ANM
Exposures: HDL, LDL, TG and TC , Body Mass Index
Outcome: ANM
Research Question: Do lipid levels influence ANM independent of BMI? and does BMI affect the each lipid level independent of ANM.

######################################################
# Reverse Multivariable MR: Lipids + BMI → ANM 
######################################################

#Exposures = Lipids + BMI
exp_mvmr_lipids_to_anm_bmi <- mv_extract_exposures(
  id_exposure = c(
    lipids,   # lipids
    "ieu-a-2" # BMI
  ),
  clump_r2 = 0.001,
  clump_kb = 10000,
  pop = "EUR"
)
Please look at vignettes for options on running this locally if you need to run many instances of this command.
Clumping 1, 330 variants, using EUR population reference
Removing 144 of 330 variants due to LD with other variants or absence from LD reference panel
Extracting data for 186 SNP(s) from 5 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 16
Querying variant chunk 2 of 16
Querying variant chunk 3 of 16
Querying variant chunk 4 of 16
Querying variant chunk 5 of 16
Querying variant chunk 6 of 16
Querying variant chunk 7 of 16
Querying variant chunk 8 of 16
Querying variant chunk 9 of 16
Querying variant chunk 10 of 16
Querying variant chunk 11 of 16
Querying variant chunk 12 of 16
Querying variant chunk 13 of 16
Querying variant chunk 14 of 16
Querying variant chunk 15 of 16
Querying variant chunk 16 of 16
Finding proxies for 1 SNPs in outcome ebi-a-GCST002222
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Finding proxies for 1 SNPs in outcome ebi-a-GCST002223
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Finding proxies for 2 SNPs in outcome ebi-a-GCST002216
Extracting data for 2 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Finding proxies for 1 SNPs in outcome ebi-a-GCST002221
Extracting data for 1 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Finding proxies for 2 SNPs in outcome ieu-a-2
Extracting data for 2 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
Harmonising LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222) and Triglycerides || id:ebi-a-GCST002216 (ebi-a-GCST002216)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs14810, rs17001654, rs3758348, rs378479, rs7534572, rs9491696, rs9914578
Harmonising LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222) and Cholesterol, total || id:ebi-a-GCST002221 (ebi-a-GCST002221)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs14810, rs17001654, rs3758348, rs378479, rs7534572, rs9491696, rs9914578
Harmonising LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222) and HDL cholesterol || id:ebi-a-GCST002223 (ebi-a-GCST002223)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs14810, rs17001654, rs3758348, rs378479, rs7534572, rs9491696, rs9914578
Harmonising LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222) and Body mass index || id:ieu-a-2 (ieu-a-2)
Removing the following SNPs for being palindromic with intermediate allele frequencies:
rs14810, rs17001654, rs3758348, rs378479, rs9491696, rs9914578
#Outcome = ANM
out_mvmr_lipids_to_anm_bmi <- extract_outcome_data(
  snps     = exp_mvmr_lipids_to_anm_bmi$SNP,
  outcomes = "ieu-a-1004"
)
Extracting data for 176 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 3
Querying variant chunk 2 of 3
Querying variant chunk 3 of 3
Finding proxies for 5 SNPs in outcome ieu-a-1004
Extracting data for 5 SNP(s) from 1 GWAS(s)
Querying id chunk 1 of 1
Querying variant chunk 1 of 1
#Harmonise  
mvmr_dat_lipids_to_anm_bmi <- mv_harmonise_data(
  exposure_dat = exp_mvmr_lipids_to_anm_bmi,
  outcome_dat  = out_mvmr_lipids_to_anm_bmi
)
Harmonising LDL cholesterol || id:ebi-a-GCST002222 (ebi-a-GCST002222) and Age at menopause || id:ieu-a-1004 (ieu-a-1004)
#Run multivariable MR
res_mvmr_lipids_to_anm_bmi <- mv_multiple(mvmr_dat_lipids_to_anm_bmi)
res_mvmr_lipids_to_anm_bmi$result
       id.exposure                                  exposure id.outcome
1 ebi-a-GCST002216      Triglycerides || id:ebi-a-GCST002216 ieu-a-1004
2 ebi-a-GCST002221 Cholesterol, total || id:ebi-a-GCST002221 ieu-a-1004
3 ebi-a-GCST002222    LDL cholesterol || id:ebi-a-GCST002222 ieu-a-1004
4 ebi-a-GCST002223    HDL cholesterol || id:ebi-a-GCST002223 ieu-a-1004
5          ieu-a-2             Body mass index || id:ieu-a-2 ieu-a-1004
                            outcome nsnp          b        se      pval
1 Age at menopause || id:ieu-a-1004   35 -0.1684315 0.3673050 0.6465500
2 Age at menopause || id:ieu-a-1004   67  0.9683181 0.9968569 0.3313634
3 Age at menopause || id:ieu-a-1004   53 -0.9215895 0.8679854 0.2883461
4 Age at menopause || id:ieu-a-1004   69 -0.4519502 0.4398711 0.3042037
5 Age at menopause || id:ieu-a-1004   51 -0.1394662 0.1631868 0.3927496
#Plot reverse MVMR

ggplot(res_mvmr_lipids_to_anm_bmi$result, aes(x = exposure, y = b)) +
  geom_point(size = 3) +
  geom_errorbar(
    aes(ymin = b - 1.96 * se, ymax = b + 1.96 * se),
    width = 0.15
  ) +
  theme_bw() +
  theme(
    axis.text.x = element_text(angle = 30, hjust = 1, size = 11)
  ) +
  labs(
    title = "Reverse MVMR: Effects of Lipids and BMI on Age at Natural Menopause (ANM)",
    x = "Exposure",
    y = "Effect on ANM"
  )

5.9.1.1 Results for Reverse MVMR (Lipids + BMI → ANM)

Exposure SNPs β SE p-value Interpretation
Triglycerides (TG) 35 -0.1684 0.3673 0.6466 Not significant
Total Cholesterol (TC) 67 0.9683 0.9969 0.3314 Not significant
LDL Cholesterol 53 -0.9216 0.8680 0.2883 Not significant
HDL Cholesterol 69 -0.4520 0.4399 0.3042 Not significant
Body Mass Index (BMI) 51 -0.1395 0.1632 0.3927 Not significant

Conclusion: No evidence that increase in Lipid levels, even after adjusting for BMI influence the menopause timing

6 Conclusion

This study investigated the causal links between reproductive timing—age at menarche (AAM) and age at natural menopause (ANM)—and major metabolic traits, including type 2 diabetes (T2D), lipid levels (HDL, LDL, triglycerides, total cholesterol), and BMI. Overall, the findings provide strong evidence that BMI is the key driver linking reproductive timing and metabolic risk, while AAM and ANM themselves show limited or trait-specific causal effects with the exception of AAM influencing HDL. Therefore, we can conclude that AAM and ANM are not reliable standalone predictors of T2D or lipid disorders when considered independently of BMI. BMI should be prioritized as a modifiable risk factor in the prevention of early puberty and metabolic disease. AAM may be useful as an early-life indicator of metabolic vulnerability, but mainly because it reflects underlying adiposity rather than reproductive biology. These findings suggest that reproductive timing reflects underlying metabolic risk largely through adiposity rather than direct hormonal mechanisms.

Limitations

Several multivariable Mendelian randomization analyses could not be performed due to insufficient SNP overlap following harmonisation. While forward Mendelian randomization analyses were successful, reverse and multivariable analyses required genetic variants to be simultaneously associated with multiple exposures and present in the outcome GWAS. Reproductive timing traits such as age at menarche and age at natural menopause are highly polygenic, whereas lipid traits and type 2 diabetes share fewer genome-wide significant variants with these traits. As a result, the intersection of valid instruments across all datasets was limited, leading to harmonisation failure. This reflects differences in genetic architecture rather than methodological error and highlights a known limitation of multivariable MR when applied to complex traits.

Strong heterogeneity in many models suggests biological complexity and possible balanced pleiotropy. Meaning that the genetic variants affect the outcome through other pathway than through the exposure, but these pleiotropic effects are random and cancel out in average. The results are specific to European-ancestry populations and it was difficult to find sex-stratified GWAS studies.

Future directions

  • Replicate in other ancestries to see whether the causal effects are the same as what we have seen in this study.

  • Explore the causal effects of reproductive timing with other cardiovascular traits and other metabolic traits.

  • Investigate the multivariable hormonal modeling.

  • Understand the biological mechanism of where we see positive causation.

  • Explore other pleiotropy and heterogeneity methods

    • MR-PRESSO - detects and eliminates outlier SNPs driving pleiotropy.

    • CAUSE – models correlated pleiotropy.

    • Radial MR – identify variants influencing pleiotropy.